Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Unified Diff: src/gpu/gl/GrGLProcessor.h

Issue 772513002: create and thread batch tracker object (Closed) Base URL: https://skia.googlesource.com/skia.git@2_vertex_attr
Patch Set: rebase Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLGeometryProcessor.h ('k') | src/gpu/gl/GrGLProgram.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
};
« no previous file with comments | « src/gpu/gl/GrGLGeometryProcessor.h ('k') | src/gpu/gl/GrGLProgram.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698