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

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

Issue 608253002: Add isSingleComponent bool to getConstantColorComponent (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update comment and nits 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
Index: src/gpu/effects/GrCustomCoordsTextureEffect.cpp
diff --git a/src/gpu/effects/GrCustomCoordsTextureEffect.cpp b/src/gpu/effects/GrCustomCoordsTextureEffect.cpp
index b9794c149ddc8c9657bdbb9979ce0d80567aa5f4..ff15bc79f9b25ca06c0aeb9ada27d11fb5058c83 100644
--- a/src/gpu/effects/GrCustomCoordsTextureEffect.cpp
+++ b/src/gpu/effects/GrCustomCoordsTextureEffect.cpp
@@ -72,14 +72,13 @@ bool GrCustomCoordsTextureEffect::onIsEqual(const GrProcessor& other) const {
return fTextureAccess == cte.fTextureAccess;
}
-void GrCustomCoordsTextureEffect::getConstantColorComponents(GrColor* color,
- uint32_t* validFlags) const {
- if ((*validFlags & kA_GrColorComponentFlag) && 0xFF == GrColorUnpackA(*color) &&
- GrPixelConfigIsOpaque(this->texture(0)->config())) {
- *validFlags = kA_GrColorComponentFlag;
+void GrCustomCoordsTextureEffect::onComputeInvarientOutput(InvarientOutput* invarientOutput) const {
+ if (invarientOutput->hasOpaqueAlpha() && GrPixelConfigIsOpaque(this->texture(0)->config())) {
+ invarientOutput->validFlags = kA_GrColorComponentFlag;
} else {
- *validFlags = 0;
+ invarientOutput->validFlags = 0;
}
+ invarientOutput->isSingleComponent = false;
}
const GrBackendGeometryProcessorFactory& GrCustomCoordsTextureEffect::getFactory() const {

Powered by Google App Engine
This is Rietveld 408576698