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

Unified Diff: src/gpu/GrPipelineBuilder.cpp

Issue 1893133002: Add requireHWAA param to GrPipelineBuilder constructor (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_create_data
Patch Set: rebase Created 4 years, 8 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/GrPipelineBuilder.cpp
diff --git a/src/gpu/GrPipelineBuilder.cpp b/src/gpu/GrPipelineBuilder.cpp
index 252c26577e5f15c65349b1cd87cde0b5772911d6..02aef16db73c9aca0f1778314ea3ac4bb1599b71 100644
--- a/src/gpu/GrPipelineBuilder.cpp
+++ b/src/gpu/GrPipelineBuilder.cpp
@@ -20,7 +20,9 @@ GrPipelineBuilder::GrPipelineBuilder()
SkDEBUGCODE(fBlockEffectRemovalCnt = 0;)
}
-GrPipelineBuilder::GrPipelineBuilder(const GrPaint& paint, GrRenderTarget* rt, const GrClip& clip) {
+GrPipelineBuilder::GrPipelineBuilder(const GrPaint& paint, GrRenderTarget* rt, const GrClip& clip,
+ bool requireHWAA) {
+ SkASSERT(!requireHWAA || (rt->isStencilBufferMultisampled() && paint.isAntiAlias()));
SkDEBUGCODE(fBlockEffectRemovalCnt = 0;)
for (int i = 0; i < paint.numColorFragmentProcessors(); ++i) {
@@ -43,7 +45,7 @@ GrPipelineBuilder::GrPipelineBuilder(const GrPaint& paint, GrRenderTarget* rt, c
fClip = clip;
this->setState(GrPipelineBuilder::kHWAntialias_Flag,
- rt->isUnifiedMultisampled() && paint.isAntiAlias());
+ requireHWAA || (rt->isUnifiedMultisampled() && paint.isAntiAlias()));
this->setState(GrPipelineBuilder::kDisableOutputConversionToSRGB_Flag,
paint.getDisableOutputConversionToSRGB());
this->setState(GrPipelineBuilder::kAllowSRGBInputs_Flag,

Powered by Google App Engine
This is Rietveld 408576698