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

Unified Diff: src/gpu/GrPaint.cpp

Issue 1161273005: Update XPF invariant info to not account for conflation (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_reenablebea
Patch Set: rebase Created 5 years, 7 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/GrInOrderCommandBuilder.cpp ('k') | src/gpu/GrPipelineBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/gpu/GrInOrderCommandBuilder.cpp ('k') | src/gpu/GrPipelineBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698