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

Unified Diff: src/gpu/effects/GrDistanceFieldGeoProc.h

Issue 1110993002: Revert of removing equality / compute invariant loops from GrGeometryProcessors (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanup1
Patch Set: Created 5 years, 8 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/GrDashingEffect.cpp ('k') | src/gpu/effects/GrDistanceFieldGeoProc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrDistanceFieldGeoProc.h
diff --git a/src/gpu/effects/GrDistanceFieldGeoProc.h b/src/gpu/effects/GrDistanceFieldGeoProc.h
index b611a7c8dcb3531f082bf9ffdbd0125778d090df..0ae0c0f7111efc9467e93f5107a67625c2bd032c 100644
--- a/src/gpu/effects/GrDistanceFieldGeoProc.h
+++ b/src/gpu/effects/GrDistanceFieldGeoProc.h
@@ -49,15 +49,16 @@
#ifdef SK_GAMMA_APPLY_TO_A8
static GrGeometryProcessor* Create(GrColor color, const SkMatrix& viewMatrix,
GrTexture* tex, const GrTextureParams& params,
- float lum, uint32_t flags) {
- return SkNEW_ARGS(GrDistanceFieldA8TextGeoProc, (color, viewMatrix, tex, params, lum,
- flags));
+ float lum, uint32_t flags, bool opaqueVertexColors) {
+ return SkNEW_ARGS(GrDistanceFieldA8TextGeoProc, (color, viewMatrix, tex,
+ params, lum, flags, opaqueVertexColors));
}
#else
static GrGeometryProcessor* Create(GrColor color, const SkMatrix& viewMatrix,
GrTexture* tex, const GrTextureParams& params,
- uint32_t flags) {
- return SkNEW_ARGS(GrDistanceFieldA8TextGeoProc, (color, viewMatrix, tex, params, flags));
+ uint32_t flags, bool opaqueVertexColors) {
+ return SkNEW_ARGS(GrDistanceFieldA8TextGeoProc, (color, viewMatrix, tex,
+ params, flags, opaqueVertexColors));
}
#endif
@@ -82,13 +83,21 @@
void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const override;
+ bool onCanMakeEqual(const GrBatchTracker&,
+ const GrGeometryProcessor&,
+ const GrBatchTracker&) const override;
+
private:
GrDistanceFieldA8TextGeoProc(GrColor, const SkMatrix& viewMatrix,
GrTexture* texture, const GrTextureParams& params,
#ifdef SK_GAMMA_APPLY_TO_A8
float distanceAdjust,
#endif
- uint32_t flags);
+ uint32_t flags, bool opaqueVertexColors);
+
+ bool onIsEqual(const GrGeometryProcessor& other) const override;
+
+ void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const override;
GrTextureAccess fTextureAccess;
#ifdef SK_GAMMA_APPLY_TO_A8
@@ -115,8 +124,9 @@
public:
static GrGeometryProcessor* Create(GrColor color, const SkMatrix& viewMatrix, GrTexture* tex,
const GrTextureParams& params,
- uint32_t flags) {
- return SkNEW_ARGS(GrDistanceFieldPathGeoProc, (color, viewMatrix, tex, params, flags));
+ uint32_t flags, bool opaqueVertexColors) {
+ return SkNEW_ARGS(GrDistanceFieldPathGeoProc, (color, viewMatrix, tex, params,
+ flags, opaqueVertexColors));
}
virtual ~GrDistanceFieldPathGeoProc() {}
@@ -137,9 +147,18 @@
void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const override;
+ bool onCanMakeEqual(const GrBatchTracker&,
+ const GrGeometryProcessor&,
+ const GrBatchTracker&) const override;
+
private:
GrDistanceFieldPathGeoProc(GrColor, const SkMatrix& viewMatrix, GrTexture* texture,
- const GrTextureParams& params, uint32_t flags);
+ const GrTextureParams& params, uint32_t flags,
+ bool opaqueVertexColors);
+
+ bool onIsEqual(const GrGeometryProcessor& other) const override;
+
+ void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const override;
GrTextureAccess fTextureAccess;
uint32_t fFlags;
@@ -200,10 +219,18 @@
void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const override;
+ bool onCanMakeEqual(const GrBatchTracker&,
+ const GrGeometryProcessor&,
+ const GrBatchTracker&) const override;
+
private:
GrDistanceFieldLCDTextGeoProc(GrColor, const SkMatrix& viewMatrix,
GrTexture* texture, const GrTextureParams& params,
DistanceAdjust wa, uint32_t flags);
+
+ bool onIsEqual(const GrGeometryProcessor& other) const override;
+
+ void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const override;
GrTextureAccess fTextureAccess;
DistanceAdjust fDistanceAdjust;
« no previous file with comments | « src/gpu/effects/GrDashingEffect.cpp ('k') | src/gpu/effects/GrDistanceFieldGeoProc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698