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

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

Issue 617853003: Revert of Add isSingleComponent bool to getConstantColorComponent (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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/GrDistanceFieldTextureEffect.h ('k') | src/gpu/effects/GrDitherEffect.cpp » ('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 245a0355922657733f67cb087a1ec755f76fe805..d5d334805c105eb56012bf8729353df9b1b99655 100755
--- a/src/gpu/effects/GrDistanceFieldTextureEffect.cpp
+++ b/src/gpu/effects/GrDistanceFieldTextureEffect.cpp
@@ -206,14 +206,14 @@
fFlags == cte.fFlags;
}
-void GrDistanceFieldTextureEffect::onComputeInvariantOutput(
- InvariantOutput* inout) const {
- if (inout->isOpaque() && GrPixelConfigIsOpaque(this->texture(0)->config())) {
- inout->fValidFlags = kA_GrColorComponentFlag;
+void GrDistanceFieldTextureEffect::getConstantColorComponents(GrColor* color,
+ uint32_t* validFlags) const {
+ if ((*validFlags & kA_GrColorComponentFlag) && 0xFF == GrColorUnpackA(*color) &&
+ GrPixelConfigIsOpaque(this->texture(0)->config())) {
+ *validFlags = kA_GrColorComponentFlag;
} else {
- inout->fValidFlags = 0;
- }
- inout->fIsSingleComponent = false;
+ *validFlags = 0;
+ }
}
const GrBackendGeometryProcessorFactory& GrDistanceFieldTextureEffect::getFactory() const {
@@ -476,14 +476,14 @@
fFlags == cte.fFlags);
}
-void GrDistanceFieldLCDTextureEffect::onComputeInvariantOutput(
- InvariantOutput* inout) const {
- if (inout->isOpaque() && GrPixelConfigIsOpaque(this->texture(0)->config())) {
- inout->fValidFlags = kA_GrColorComponentFlag;
+void GrDistanceFieldLCDTextureEffect::getConstantColorComponents(GrColor* color,
+ uint32_t* validFlags) const {
+ if ((*validFlags & kA_GrColorComponentFlag) && 0xFF == GrColorUnpackA(*color) &&
+ GrPixelConfigIsOpaque(this->texture(0)->config())) {
+ *validFlags = kA_GrColorComponentFlag;
} else {
- inout->fValidFlags = 0;
- }
- inout->fIsSingleComponent = false;
+ *validFlags = 0;
+ }
}
const GrBackendGeometryProcessorFactory& GrDistanceFieldLCDTextureEffect::getFactory() const {
« no previous file with comments | « src/gpu/effects/GrDistanceFieldTextureEffect.h ('k') | src/gpu/effects/GrDitherEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698