shadow$provide.module$node_modules$pixi_DOT_js$lib$scene$sprite$SpritePipe = function(global, require, module, exports) {
  global = require("module$node_modules$pixi_DOT_js$lib$extensions$Extensions");
  var BatchableSprite = require("module$node_modules$pixi_DOT_js$lib$scene$sprite$BatchableSprite");
  "use strict";
  class SpritePipe {
    constructor(renderer) {
      this._renderer = renderer;
    }
    addRenderable(sprite, instructionSet) {
      const gpuSprite = this._getGpuSprite(sprite);
      sprite.didViewUpdate && this._updateBatchableSprite(sprite, gpuSprite);
      this._renderer.renderPipes.batch.addToBatch(gpuSprite, instructionSet);
    }
    updateRenderable(sprite) {
      const gpuSprite = this._getGpuSprite(sprite);
      sprite.didViewUpdate && this._updateBatchableSprite(sprite, gpuSprite);
      gpuSprite._batcher.updateElement(gpuSprite);
    }
    validateRenderable(sprite) {
      const gpuSprite = this._getGpuSprite(sprite);
      return !gpuSprite._batcher.checkAndUpdateTexture(gpuSprite, sprite._texture);
    }
    _updateBatchableSprite(sprite, batchableSprite) {
      batchableSprite.bounds = sprite.visualBounds;
      batchableSprite.texture = sprite._texture;
    }
    _getGpuSprite(sprite) {
      return sprite._gpuData[this._renderer.uid] || this._initGPUSprite(sprite);
    }
    _initGPUSprite(sprite) {
      const batchableSprite = new BatchableSprite.BatchableSprite();
      batchableSprite.renderable = sprite;
      batchableSprite.transform = sprite.groupTransform;
      batchableSprite.texture = sprite._texture;
      batchableSprite.bounds = sprite.visualBounds;
      batchableSprite.roundPixels = this._renderer._roundPixels | sprite._roundPixels;
      return sprite._gpuData[this._renderer.uid] = batchableSprite;
    }
    destroy() {
      this._renderer = null;
    }
  }
  SpritePipe.extension = {type:[global.ExtensionType.WebGLPipes, global.ExtensionType.WebGPUPipes, global.ExtensionType.CanvasPipes], name:"sprite"};
  exports.SpritePipe = SpritePipe;
};

//# sourceMappingURL=module$node_modules$pixi_DOT_js$lib$scene$sprite$SpritePipe.js.map
