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

Unified Diff: src/gpu/gl/builders/GrGLFragmentOnlyProgramBuilder.h

Issue 551253004: Changes to remove program effects builder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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/gl/GrGLProgramEffects.cpp ('k') | src/gpu/gl/builders/GrGLFragmentOnlyProgramBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/builders/GrGLFragmentOnlyProgramBuilder.h
diff --git a/src/gpu/gl/builders/GrGLFragmentOnlyProgramBuilder.h b/src/gpu/gl/builders/GrGLFragmentOnlyProgramBuilder.h
index 5a4c4ad369b0d0ecac2151aca5686bc497cb98b4..291669c0a863f0eb7b0fdd7990d17aa6bfef6755 100644
--- a/src/gpu/gl/builders/GrGLFragmentOnlyProgramBuilder.h
+++ b/src/gpu/gl/builders/GrGLFragmentOnlyProgramBuilder.h
@@ -17,20 +17,38 @@ public:
int addTexCoordSets(int count);
private:
- virtual void emitCodeBeforeEffects(GrGLSLExpr4* color,
- GrGLSLExpr4* coverage) SK_OVERRIDE {}
-
- virtual void emitGeometryProcessor(const GrEffectStage* geometryProcessor,
- GrGLSLExpr4* coverage) SK_OVERRIDE {
- SkASSERT(NULL == geometryProcessor);
- }
-
- virtual GrGLProgramEffects* createAndEmitEffects(const GrEffectStage* effectStages[],
- int effectCnt,
- const GrGLProgramDesc::EffectKeyProvider&,
- GrGLSLExpr4* inOutFSColor) SK_OVERRIDE;
-
- virtual void emitCodeAfterEffects() SK_OVERRIDE {}
+ virtual void createAndEmitEffects(const GrEffectStage* geometryProcessor,
+ const GrEffectStage* colorStages[],
+ const GrEffectStage* coverageStages[],
+ GrGLSLExpr4* inputColor,
+ GrGLSLExpr4* inputCoverage) SK_OVERRIDE;
+
+ GrGLProgramEffects* onCreateAndEmitEffects(const GrEffectStage* effectStages[],
+ int effectCnt,
+ const GrGLProgramDesc::EffectKeyProvider&,
+ GrGLSLExpr4* inOutFSColor);
+
+ virtual void emitEffect(const GrEffectStage& stage,
+ const GrEffectKey& key,
+ const char* outColor,
+ const char* inColor,
+ int stageIndex) SK_OVERRIDE;
+
+ /**
+ * Helper for emitEffect(). Allocates texture units from the builder for each transform in an
+ * effect. The transforms all use adjacent texture units. They either use two or three of the
+ * coordinates at a given texture unit, depending on if they need perspective interpolation.
+ * The expressions to access the transformed coords (i.e. 'vec2(gl_TexCoord[0])') as well as the
+ * types are appended to the TransformedCoordsArray* object, which is in turn passed to the
+ * effect's emitCode() function.
+ */
+ void setupPathTexGen(const GrEffectStage&, GrGLEffect::TransformedCoordsArray*);
+
+ virtual GrGLProgramEffects* getProgramEffects() SK_OVERRIDE { return fProgramEffects.get(); }
+
+ typedef GrGLProgramDesc::EffectKeyProvider EffectKeyProvider;
+
+ SkAutoTDelete<GrGLPathTexGenProgramEffects> fProgramEffects;
typedef GrGLProgramBuilder INHERITED;
};
« no previous file with comments | « src/gpu/gl/GrGLProgramEffects.cpp ('k') | src/gpu/gl/builders/GrGLFragmentOnlyProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698