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

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

Issue 1153803005: Revert of Fix LCD coverage regression in GrPorterDuffXPFactory (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « no previous file | tests/GrPorterDuffTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrPorterDuffXferProcessor.cpp
diff --git a/src/gpu/effects/GrPorterDuffXferProcessor.cpp b/src/gpu/effects/GrPorterDuffXferProcessor.cpp
index bc61f499e42ba3263af5f57d7f4ed817f3ef7d7e..de0143aceaf72346f818ddce9b71278a5e812aef 100644
--- a/src/gpu/effects/GrPorterDuffXferProcessor.cpp
+++ b/src/gpu/effects/GrPorterDuffXferProcessor.cpp
@@ -744,16 +744,11 @@
void GrPorterDuffXPFactory::getInvariantOutput(const GrProcOptInfo& colorPOI,
const GrProcOptInfo& coveragePOI,
GrXPFactory::InvariantOutput* output) const {
- output->fWillBlendWithDst = true;
- output->fBlendedColorFlags = kNone_GrColorComponentFlags;
-
- // The LCD coverage XP doesn't use the blend table, and has no invariant output.
- if (coveragePOI.isFourChannelOutput()) {
- return;
- }
-
const BlendFormula& blendFormula = get_blend_formula(fXfermode, colorPOI, coveragePOI);
+
if (blendFormula.usesDstColor()) {
+ output->fWillBlendWithDst = true;
+ output->fBlendedColorFlags = kNone_GrColorComponentFlags;
return;
}
@@ -773,18 +768,16 @@
output->fBlendedColorFlags = colorPOI.validFlags();
return;
- default: return;
+ // TODO: update if we ever use const color.
+ default:
+ output->fBlendedColorFlags = kNone_GrColorComponentFlags;
+ return;
}
}
bool GrPorterDuffXPFactory::willReadDstColor(const GrCaps& caps,
const GrProcOptInfo& colorPOI,
const GrProcOptInfo& coveragePOI) const {
- // The LCD coverage XP doesn't use the blend table, and never requires a dst read.
- if (coveragePOI.isFourChannelOutput()) {
- return false;
- }
-
// Some formulas use dual source blending, so we fall back if it is required but not supported.
return !caps.shaderCaps()->dualSourceBlendingSupport() &&
get_blend_formula(fXfermode, colorPOI, coveragePOI).hasSecondaryOutput();
« no previous file with comments | « no previous file | tests/GrPorterDuffTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698