| Index: src/gpu/gl/GrGLProcessor.h
|
| diff --git a/src/gpu/gl/GrGLProcessor.h b/src/gpu/gl/GrGLProcessor.h
|
| index ca4fa2459f97a1c1ca9b823120fae1d2bdcfeafa..6401e2b324abdacfc36fe11fdafd1e24017bb2e3 100644
|
| --- a/src/gpu/gl/GrGLProcessor.h
|
| +++ b/src/gpu/gl/GrGLProcessor.h
|
| @@ -22,7 +22,7 @@
|
| that their GrGLProcessors would emit the same GLSL code.
|
|
|
| The GrGLProcessor subclass must also have a constructor of the form:
|
| - EffectSubclass::EffectSubclass(const GrBackendProcessorFactory&, const GrProcessor&)
|
| + ProcessorSubclass::ProcessorSubclass(const GrBackendProcessorFactory&, const GrProcessor&)
|
|
|
| These objects are created by the factory object returned by the GrProcessor::getFactory().
|
| */
|
| @@ -70,13 +70,6 @@ public:
|
|
|
| virtual ~GrGLProcessor() {}
|
|
|
| - /** A GrGLProcessor instance can be reused with any GrProcessor that produces the same stage
|
| - key; this function reads data from a GrProcessor and uploads any uniform variables required
|
| - by the shaders created in emitCode(). The GrProcessor parameter is guaranteed to be of the
|
| - same type that created this GrGLProcessor and to have an identical effect key as the one
|
| - that created this GrGLProcessor. */
|
| - virtual void setData(const GrGLProgramDataManager&, const GrProcessor&) {}
|
| -
|
| const char* name() const { return fFactory.name(); }
|
|
|
| static void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKeyBuilder*) {}
|
| @@ -100,7 +93,7 @@ public:
|
| stages.
|
|
|
| @param builder Interface used to emit code in the shaders.
|
| - @param effect The effect that generated this program stage.
|
| + @param processor The processor that generated this program stage.
|
| @param key The key that was computed by GenKey() from the generating GrProcessor.
|
| @param outputColor A predefined vec4 in the FS in which the stage should place its output
|
| color (or coverage).
|
| @@ -108,19 +101,27 @@ public:
|
| NULL in which case the implied input is solid white (all ones).
|
| TODO: Better system for communicating optimization info (e.g. input
|
| color is solid white, trans black, known to be opaque, etc.) that allows
|
| - the effect to communicate back similar known info about its output.
|
| + the processor to communicate back similar known info about its output.
|
| @param samplers Contains one entry for each GrTextureAccess of the GrProcessor. These
|
| can be passed to the builder to emit texture reads in the generated
|
| code.
|
| TODO this should take a struct
|
| */
|
| virtual void emitCode(GrGLFPBuilder* builder,
|
| - const GrFragmentProcessor& effect,
|
| + const GrFragmentProcessor&,
|
| const char* outputColor,
|
| const char* inputColor,
|
| const TransformedCoordsArray& coords,
|
| const TextureSamplerArray& samplers) = 0;
|
|
|
| + /** A GrGLFragmentProcessor instance can be reused with any GrFragmentProcessor that produces
|
| + the same stage key; this function reads data from a GrFragmentProcessor and uploads any
|
| + uniform variables required by the shaders created in emitCode(). The GrFragmentProcessor
|
| + parameter is guaranteed to be of the same type that created this GrGLFragmentProcessor and
|
| + to have an identical processor key as the one that created this GrGLFragmentProcessor. */
|
| + // TODO update this to pass in GrFragmentProcessor
|
| + virtual void setData(const GrGLProgramDataManager&, const GrProcessor&) {}
|
| +
|
| private:
|
| typedef GrGLProcessor INHERITED;
|
| };
|
|
|