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

Unified Diff: src/gpu/gl/GrGLProgramEffects.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/gl/GrGLProgramDesc.cpp ('k') | src/gpu/gl/GrGLProgramEffects.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLProgramEffects.h
diff --git a/src/gpu/gl/GrGLProgramEffects.h b/src/gpu/gl/GrGLProgramEffects.h
index 79afa0a1688ad69544b0e58a228fa32f3bb2f0bc..dd3feab8435147f1aebc99572ffc573901349948 100644
--- a/src/gpu/gl/GrGLProgramEffects.h
+++ b/src/gpu/gl/GrGLProgramEffects.h
@@ -39,7 +39,10 @@ public:
* which must be different for every GrEffect subclass. It can fail if an effect uses too many
* textures, attributes, etc for the space allotted in the meta-key.
*/
- static bool GenEffectMetaKey(const GrDrawEffect&, const GrGLCaps&, GrEffectKeyBuilder*);
+ static bool GenEffectMetaKey(const GrEffectStage&,
+ bool,
+ const GrGLCaps&,
+ GrEffectKeyBuilder*);
virtual ~GrGLProgramEffects();
@@ -114,9 +117,9 @@ protected:
/**
* Helpers for GenEffectMetaKey.
*/
- static uint32_t GenAttribKey(const GrEffect&);
- static uint32_t GenTransformKey(const GrDrawEffect&);
- static uint32_t GenTextureKey(const GrDrawEffect&, const GrGLCaps&);
+ static uint32_t GenAttribKey(const GrEffect*);
+ static uint32_t GenTransformKey(const GrEffectStage&, bool useExplicitLocalCoords);
+ static uint32_t GenTextureKey(const GrEffect*, const GrGLCaps&);
GrGLProgramEffects(int reserveCount)
: fGLEffects(reserveCount)
@@ -128,12 +131,12 @@ protected:
* appends the necessary data to the TextureSamplerArray* object so effects can add texture
* lookups to their code. This method is only meant to be called during the construction phase.
*/
- void emitSamplers(GrGLProgramBuilder*, const GrEffect*, TextureSamplerArray*);
+ void emitSamplers(GrGLProgramBuilder*, const GrEffect&, TextureSamplerArray*);
/**
* Helper for setData(). Binds all the textures for an effect.
*/
- void bindTextures(GrGpuGL*, const GrEffect*, int effectIdx);
+ void bindTextures(GrGpuGL*, const GrEffect&, int effectIdx);
struct Sampler {
SkDEBUGCODE(Sampler() : fTextureUnit(-1) {})
@@ -212,14 +215,15 @@ private:
* TransformedCoordsArray* object, which is in turn passed to the effect's emitCode() function.
*/
void emitTransforms(GrGLFullProgramBuilder*,
- const GrDrawEffect&,
+ const GrEffectStage&,
TransformedCoordsArray*);
/**
* Helper for setData(). Sets all the transform matrices for an effect.
*/
- void setTransformData(GrGpuGL* gpu, const GrGLProgramDataManager&, const GrDrawEffect&, int effectIdx);
- void setPathTransformData(GrGpuGL* gpu, const GrGLProgramDataManager&, const GrDrawEffect&,
+ void setTransformData(GrGpuGL* gpu, const GrGLProgramDataManager&, const GrEffectStage&,
+ int effectIdx);
+ void setPathTransformData(GrGpuGL* gpu, const GrGLProgramDataManager&, const GrEffectStage&,
int effectIdx);
struct Transform {
@@ -307,13 +311,13 @@ private:
* effect's emitCode() function.
*/
void setupPathTexGen(GrGLFragmentOnlyProgramBuilder*,
- const GrDrawEffect&,
+ const GrEffectStage&,
TransformedCoordsArray*);
/**
* Helper for setData(). Sets the PathTexGen state for each transform in an effect.
*/
- void setPathTexGenState(GrGpuGL*, const GrDrawEffect&, int effectIdx);
+ void setPathTexGenState(GrGpuGL*, const GrEffectStage&, int effectIdx);
struct Transforms {
Transforms(uint32_t transformKey, int texCoordIndex)
« no previous file with comments | « src/gpu/gl/GrGLProgramDesc.cpp ('k') | src/gpu/gl/GrGLProgramEffects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698