Index: src/gpu/GrPaint.cpp |
diff --git a/src/gpu/GrPaint.cpp b/src/gpu/GrPaint.cpp |
index c9cebad9d8077e9f91f135a6fb3ef93c0ce75d40..3c40c96d1b3b829341cdf00e904a7248960dff7e 100644 |
--- a/src/gpu/GrPaint.cpp |
+++ b/src/gpu/GrPaint.cpp |
@@ -43,20 +43,16 @@ void GrPaint::addCoverageTextureProcessor(GrTexture* texture, |
this->addCoverageProcessor(GrSimpleTextureEffect::Create(texture, matrix, params))->unref(); |
} |
-bool GrPaint::isOpaqueAndConstantColor(GrColor* color) const { |
- GrProcOptInfo coverageProcInfo; |
- coverageProcInfo.calcWithInitialValues(fCoverageStages.begin(), this->numCoverageStages(), |
- 0xFFFFFFFF, kRGBA_GrColorComponentFlags, true); |
+bool GrPaint::isConstantBlendedColor(GrColor* color) const { |
GrProcOptInfo colorProcInfo; |
colorProcInfo.calcWithInitialValues(fColorStages.begin(), this->numColorStages(), fColor, |
kRGBA_GrColorComponentFlags, false); |
- GrXPFactory::InvariantOutput output; |
- fXPFactory->getInvariantOutput(colorProcInfo, coverageProcInfo, &output); |
+ GrXPFactory::InvariantBlendedColor blendedColor; |
+ fXPFactory->getInvariantBlendedColor(colorProcInfo, &blendedColor); |
- if (kRGBA_GrColorComponentFlags == output.fBlendedColorFlags && |
- 0xFF == GrColorUnpackA(output.fBlendedColor)) { |
- *color = output.fBlendedColor; |
+ if (kRGBA_GrColorComponentFlags == blendedColor.fKnownColorFlags) { |
+ *color = blendedColor.fKnownColor; |
return true; |
} |
return false; |