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

Unified Diff: src/gpu/effects/GrDistanceFieldTextureEffect.cpp

Issue 791743003: Remove GP from drawstate, revision of invariant output for GP (Closed) Base URL: https://skia.googlesource.com/skia.git@color-to-gp
Patch Set: more windows fix Created 6 years 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/GrDistanceFieldTextureEffect.h ('k') | src/gpu/effects/GrMatrixConvolutionEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrDistanceFieldTextureEffect.cpp
diff --git a/src/gpu/effects/GrDistanceFieldTextureEffect.cpp b/src/gpu/effects/GrDistanceFieldTextureEffect.cpp
index f408d2dfec51800d3c664fbf96e716ee444ed428..66d06b6f704e6ab9e986718ab3493442659e0935 100755
--- a/src/gpu/effects/GrDistanceFieldTextureEffect.cpp
+++ b/src/gpu/effects/GrDistanceFieldTextureEffect.cpp
@@ -173,8 +173,8 @@ GrDistanceFieldTextureEffect::GrDistanceFieldTextureEffect(GrColor color,
const GrTextureParams& gammaParams,
float luminance,
#endif
- uint32_t flags)
- : INHERITED(color)
+ uint32_t flags, bool opaqueVertexColors)
+ : INHERITED(color, opaqueVertexColors)
, fTextureAccess(texture, params)
#ifdef SK_GAMMA_APPLY_TO_A8
, fGammaTextureAccess(gamma, gammaParams)
@@ -206,8 +206,8 @@ bool GrDistanceFieldTextureEffect::onIsEqual(const GrGeometryProcessor& other) c
fFlags == cte.fFlags;
}
-void GrDistanceFieldTextureEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const {
- inout->mulByUnknownAlpha();
+void GrDistanceFieldTextureEffect::onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const {
+ out->setUnknownSingleComponent();
}
void GrDistanceFieldTextureEffect::getGLProcessorKey(const GrBatchTracker& bt,
@@ -257,7 +257,8 @@ GrGeometryProcessor* GrDistanceFieldTextureEffect::TestCreate(SkRandom* random,
random->nextF(),
#endif
random->nextBool() ?
- kSimilarity_DistanceFieldEffectFlag : 0);
+ kSimilarity_DistanceFieldEffectFlag : 0,
+ random->nextBool());
}
///////////////////////////////////////////////////////////////////////////////
@@ -384,8 +385,9 @@ GrDistanceFieldNoGammaTextureEffect::GrDistanceFieldNoGammaTextureEffect(
GrColor color,
GrTexture* texture,
const GrTextureParams& params,
- uint32_t flags)
- : INHERITED(color)
+ uint32_t flags,
+ bool opaqueVertexColors)
+ : INHERITED(color, opaqueVertexColors)
, fTextureAccess(texture, params)
, fFlags(flags & kNonLCD_DistanceFieldEffectMask)
, fInColor(NULL) {
@@ -407,8 +409,8 @@ bool GrDistanceFieldNoGammaTextureEffect::onIsEqual(const GrGeometryProcessor& o
return fFlags == cte.fFlags;
}
-void GrDistanceFieldNoGammaTextureEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const {
- inout->mulByUnknownAlpha();
+void GrDistanceFieldNoGammaTextureEffect::onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const{
+ out->setUnknownSingleComponent();
}
void GrDistanceFieldNoGammaTextureEffect::getGLProcessorKey(const GrBatchTracker& bt,
@@ -446,7 +448,7 @@ GrGeometryProcessor* GrDistanceFieldNoGammaTextureEffect::TestCreate(SkRandom* r
return GrDistanceFieldNoGammaTextureEffect::Create(GrRandomColor(random), textures[texIdx],
params,
- random->nextBool() ? kSimilarity_DistanceFieldEffectFlag : 0);
+ random->nextBool() ? kSimilarity_DistanceFieldEffectFlag : 0, random->nextBool());
}
///////////////////////////////////////////////////////////////////////////////
@@ -665,9 +667,9 @@ bool GrDistanceFieldLCDTextureEffect::onIsEqual(const GrGeometryProcessor& other
fFlags == cte.fFlags);
}
-void GrDistanceFieldLCDTextureEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const {
- inout->mulByUnknownColor();
- inout->setUsingLCDCoverage();
+void GrDistanceFieldLCDTextureEffect::onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const {
+ out->setUnknownFourComponents();
+ out->setUsingLCDCoverage();
}
void GrDistanceFieldLCDTextureEffect::getGLProcessorKey(const GrBatchTracker& bt,
« no previous file with comments | « src/gpu/effects/GrDistanceFieldTextureEffect.h ('k') | src/gpu/effects/GrMatrixConvolutionEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698