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

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

Issue 356513003: Step towards variable length effect keys. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweak comment Created 6 years, 5 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
Index: src/gpu/gl/GrGLShaderBuilder.h
diff --git a/src/gpu/gl/GrGLShaderBuilder.h b/src/gpu/gl/GrGLShaderBuilder.h
index 7e71acf901f8e78df6a1bb3c32c89e8c98810b35..c28cd0999bf3c70f4824770b06478b327a12e5f3 100644
--- a/src/gpu/gl/GrGLShaderBuilder.h
+++ b/src/gpu/gl/GrGLShaderBuilder.h
@@ -13,6 +13,7 @@
#include "GrColor.h"
#include "GrEffect.h"
#include "SkTypes.h"
+#include "gl/GrGLProgramDesc.h"
#include "gl/GrGLProgramEffects.h"
#include "gl/GrGLSL.h"
#include "gl/GrGLUniformManager.h"
@@ -253,8 +254,8 @@ protected:
// Helper for emitEffects().
void createAndEmitEffects(GrGLProgramEffectsBuilder*,
const GrEffectStage* effectStages[],
- const EffectKey effectKeys[],
int effectCnt,
+ const GrGLProgramDesc::EffectKeyProvider&,
GrGLSLExpr4* inOutFSColor);
// Generates a name for a variable. The generated string will be name prefixed by the prefix
@@ -338,15 +339,15 @@ private:
/**
* Adds code for effects and returns a GrGLProgramEffects* object. The caller is responsible for
- * deleting it when finished. effectStages contains the effects to add. effectKeys[i] is the key
- * generated from effectStages[i]. inOutFSColor specifies the input color to the first stage and
- * is updated to be the output color of the last stage.
- * The handles to texture samplers for effectStage[i] are added to
+ * deleting it when finished. effectStages contains the effects to add. The effect key provider
+ * is used to communicate the key each effect created in its GenKey function. inOutFSColor
+ * specifies the input color to the first stage and is updated to be the output color of the
+ * last stage. The handles to texture samplers for effectStage[i] are added to
* effectSamplerHandles[i].
*/
virtual GrGLProgramEffects* createAndEmitEffects(const GrEffectStage* effectStages[],
- const EffectKey effectKeys[],
int effectCnt,
+ const GrGLProgramDesc::EffectKeyProvider&,
GrGLSLExpr4* inOutFSColor) = 0;
/**
@@ -465,8 +466,8 @@ private:
virtual void emitCodeBeforeEffects(GrGLSLExpr4* color, GrGLSLExpr4* coverage) SK_OVERRIDE;
virtual GrGLProgramEffects* createAndEmitEffects(const GrEffectStage* effectStages[],
- const EffectKey effectKeys[],
int effectCnt,
+ const GrGLProgramDesc::EffectKeyProvider&,
GrGLSLExpr4* inOutFSColor) SK_OVERRIDE;
virtual void emitCodeAfterEffects() SK_OVERRIDE;
@@ -510,8 +511,8 @@ private:
virtual void emitCodeBeforeEffects(GrGLSLExpr4* color, GrGLSLExpr4* coverage) SK_OVERRIDE {}
virtual GrGLProgramEffects* createAndEmitEffects(const GrEffectStage* effectStages[],
- const EffectKey effectKeys[],
int effectCnt,
+ const GrGLProgramDesc::EffectKeyProvider&,
GrGLSLExpr4* inOutFSColor) SK_OVERRIDE;
virtual void emitCodeAfterEffects() SK_OVERRIDE {}

Powered by Google App Engine
This is Rietveld 408576698