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

Unified Diff: src/gpu/GrPipeline.cpp

Issue 1001503002: Implement support for mixed sampled render targets (Closed) Base URL: https://skia.googlesource.com/skia.git@mix1
Patch Set: Fixes and squash with 3rd commit Created 5 years, 9 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/GrPipeline.cpp
diff --git a/src/gpu/GrPipeline.cpp b/src/gpu/GrPipeline.cpp
index 906426caaaecc0699dd8d878ee2ccdfa9bdfd6dd..6502829bfebf19275e8f517baa74c6ddcf117b0d 100644
--- a/src/gpu/GrPipeline.cpp
+++ b/src/gpu/GrPipeline.cpp
@@ -29,11 +29,21 @@ GrPipeline::GrPipeline(const GrPipelineBuilder& pipelineBuilder,
overrideColor = colorPOI.inputColorToEffectiveStage();
}
+ fRenderTarget.reset(pipelineBuilder.fRenderTarget.get());
+ SkASSERT(fRenderTarget);
+
GrXferProcessor::OptFlags optFlags;
if (xferProcessor) {
fXferProcessor.reset(xferProcessor.get());
- optFlags = xferProcessor->getOptimizations(colorPOI,
+ GrProcOptInfo localColorPOI = colorPOI;
+ // Optimizations will try to turn off blending which is required by mixed
+ // sampled modes.
+ bool isMixedSampledTarget =
+ (this->getRenderTarget()->sampleConfig() == kStencil_GrSampleConfig);
+ localColorPOI.setNeedsCoverageModulation(isMixedSampledTarget);
Chris Dalton 2015/03/14 02:51:30 No need to force blending unless we're actually us
+
+ optFlags = xferProcessor->getOptimizations(localColorPOI,
coveragePOI,
pipelineBuilder.getStencil().doesWrite(),
&overrideColor,
@@ -51,8 +61,6 @@ GrPipeline::GrPipeline(const GrPipelineBuilder& pipelineBuilder,
return;
}
- fRenderTarget.reset(pipelineBuilder.fRenderTarget.get());
- SkASSERT(fRenderTarget);
fScissorState = scissorState;
fStencilSettings = pipelineBuilder.getStencil();
fDrawFace = pipelineBuilder.getDrawFace();

Powered by Google App Engine
This is Rietveld 408576698