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

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

Issue 1952323002: Remove hasMixedSamples() from GrPipelineBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Comments Created 4 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/effects/GrDisableColorXP.h ('k') | 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 733e552eea7bc1298d1ad07fae918111ae6564d7..8168de6a5d58d343819bcc795e3f3be599f4b038 100644
--- a/src/gpu/effects/GrPorterDuffXferProcessor.cpp
+++ b/src/gpu/effects/GrPorterDuffXferProcessor.cpp
@@ -799,8 +799,7 @@ void GrPorterDuffXPFactory::getInvariantBlendedColor(const GrProcOptInfo& colorP
}
bool GrPorterDuffXPFactory::onWillReadDstColor(const GrCaps& caps,
- const GrPipelineOptimizations& optimizations,
- bool hasMixedSamples) const {
+ const GrPipelineOptimizations& optimizations) const {
if (caps.shaderCaps()->dualSourceBlendingSupport()) {
return false;
}
@@ -816,9 +815,12 @@ bool GrPorterDuffXPFactory::onWillReadDstColor(const GrCaps& caps,
}
return get_lcd_blend_formula(optimizations.fCoveragePOI, fXfermode).hasSecondaryOutput();
}
+
// We fallback on the shader XP when the blend formula would use dual source blending but we
// don't have support for it.
- return get_blend_formula(optimizations.fColorPOI, optimizations.fCoveragePOI, hasMixedSamples,
+ static const bool kHasMixedSamples = false;
+ SkASSERT(!caps.usesMixedSamples()); // We never use mixed samples without dual source blending.
+ return get_blend_formula(optimizations.fColorPOI, optimizations.fCoveragePOI, kHasMixedSamples,
fXfermode).hasSecondaryOutput();
}
@@ -897,8 +899,7 @@ GrXferProcessor* GrPorterDuffXPFactory::CreateSrcOverXferProcessor(
}
bool GrPorterDuffXPFactory::SrcOverWillNeedDstTexture(const GrCaps& caps,
- const GrPipelineOptimizations& optimizations,
- bool hasMixedSamples) {
+ const GrPipelineOptimizations& optimizations) {
if (caps.shaderCaps()->dstReadInShaderSupport() ||
caps.shaderCaps()->dualSourceBlendingSupport()) {
return false;
@@ -915,8 +916,11 @@ bool GrPorterDuffXPFactory::SrcOverWillNeedDstTexture(const GrCaps& caps,
return get_lcd_blend_formula(optimizations.fCoveragePOI,
SkXfermode::kSrcOver_Mode).hasSecondaryOutput();
}
+
// We fallback on the shader XP when the blend formula would use dual source blending but we
// don't have support for it.
+ static const bool kHasMixedSamples = false;
+ SkASSERT(!caps.usesMixedSamples()); // We never use mixed samples without dual source blending.
return get_blend_formula(optimizations.fColorPOI, optimizations.fCoveragePOI,
- hasMixedSamples, SkXfermode::kSrcOver_Mode).hasSecondaryOutput();
+ kHasMixedSamples, SkXfermode::kSrcOver_Mode).hasSecondaryOutput();
}
« no previous file with comments | « src/gpu/effects/GrDisableColorXP.h ('k') | tests/GrPorterDuffTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698