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

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

Issue 571163002: removing GrDrawEffect (Closed) Base URL: https://skia.googlesource.com/skia.git@gp3
Patch Set: rebase after revert Created 6 years, 3 months 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/effects/GrYUVtoRGBEffect.cpp ('k') | src/gpu/gl/GrGLGeometryProcessor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLEffect.h
diff --git a/src/gpu/gl/GrGLEffect.h b/src/gpu/gl/GrGLEffect.h
index e7d847d0a28fcc9eaaeb831c0c97aac30203c251..24c20c6d57367468a7bf8e0af0be940ab97cc3cc 100644
--- a/src/gpu/gl/GrGLEffect.h
+++ b/src/gpu/gl/GrGLEffect.h
@@ -20,19 +20,16 @@ class GrGLShaderBuilder;
include/gpu/GrEffect.h. Objects of type GrGLEffect are responsible for emitting the
GLSL code that implements a GrEffect and for uploading uniforms at draw time. If they don't
always emit the same GLSL code, they must have a function:
- static inline void GenKey(const GrDrawEffect&, const GrGLCaps&, GrEffectKeyBuilder*)
+ static inline void GenKey(const GrEffect&, const GrGLCaps&, GrEffectKeyBuilder*)
that is used to implement a program cache. When two GrEffects produce the same key this means
that their GrGLEffects would emit the same GLSL code.
The GrGLEffect subclass must also have a constructor of the form:
- EffectSubclass::EffectSubclass(const GrBackendEffectFactory&, const GrDrawEffect&)
- The effect held by the GrDrawEffect is guaranteed to be of the type that generated the
- GrGLEffect subclass instance.
+ EffectSubclass::EffectSubclass(const GrBackendEffectFactory&, const GrEffect&)
These objects are created by the factory object returned by the GrEffect::getFactory().
*/
-class GrDrawEffect;
class GrGLTexture;
class GrGLGeometryProcessor;
@@ -55,7 +52,7 @@ public:
stages.
@param builder Interface used to emit code in the shaders.
- @param drawEffect A wrapper on the effect that generated this program stage.
+ @param effect The effect that generated this program stage.
@param key The key that was computed by GenKey() from the generating GrEffect.
@param outputColor A predefined vec4 in the FS in which the stage should place its output
color (or coverage).
@@ -69,7 +66,7 @@ public:
reads in the generated code.
*/
virtual void emitCode(GrGLProgramBuilder* builder,
- const GrDrawEffect& drawEffect,
+ const GrEffect& effect,
const GrEffectKey& key,
const char* outputColor,
const char* inputColor,
@@ -78,16 +75,16 @@ public:
/** A GrGLEffect instance can be reused with any GrEffect that produces the same stage
key; this function reads data from a GrEffect and uploads any uniform variables required
- by the shaders created in emitCode(). The GrEffect installed in the GrDrawEffect is
+ by the shaders created in emitCode(). The GrEffect is
guaranteed to be of the same type that created this GrGLEffect and to have an identical
effect key as the one that created this GrGLEffect. Effects that use local coords have
to consider whether the GrEffectStage's coord change matrix should be used. When explicit
local coordinates are used it can be ignored. */
- virtual void setData(const GrGLProgramDataManager&, const GrDrawEffect&) {}
+ virtual void setData(const GrGLProgramDataManager&, const GrEffect&) {}
const char* name() const { return fFactory.name(); }
- static void GenKey(const GrDrawEffect&, const GrGLCaps&, GrEffectKeyBuilder*) {}
+ static void GenKey(const GrEffect&, const GrGLCaps&, GrEffectKeyBuilder*) {}
/** Used by the system when generating shader code, to see if this effect can be downcasted to
the internal GrGLGeometryProcessor type */
« no previous file with comments | « src/gpu/effects/GrYUVtoRGBEffect.cpp ('k') | src/gpu/gl/GrGLGeometryProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698