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

Unified Diff: src/gpu/GrRenderTarget.cpp

Issue 2468653002: Remove GrStencilSettings from GrPipeline (Closed)
Patch Set: Remove GrStencilSettings from GrPipeline Created 4 years, 1 month 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/GrReducedClip.cpp ('k') | src/gpu/GrRenderTargetPriv.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrRenderTarget.cpp
diff --git a/src/gpu/GrRenderTarget.cpp b/src/gpu/GrRenderTarget.cpp
index 09d43f99e4085764da7a58c4656490ab3a94b9df..e7782cc85204dd2de122f90be691ca9af6c9cc5b 100644
--- a/src/gpu/GrRenderTarget.cpp
+++ b/src/gpu/GrRenderTarget.cpp
@@ -15,6 +15,7 @@
#include "GrRenderTargetOpList.h"
#include "GrRenderTargetPriv.h"
#include "GrStencilAttachment.h"
+#include "GrStencilSettings.h"
GrRenderTarget::GrRenderTarget(GrGpu* gpu, const GrSurfaceDesc& desc, Flags flags,
GrStencilAttachment* stencil)
@@ -100,17 +101,19 @@ bool GrRenderTargetPriv::attachStencilAttachment(GrStencilAttachment* stencil) {
}
int GrRenderTargetPriv::numStencilBits() const {
- return fRenderTarget->fStencilAttachment ? fRenderTarget->fStencilAttachment->bits() : 0;
+ SkASSERT(this->getStencilAttachment());
+ return this->getStencilAttachment()->bits();
}
const GrGpu::MultisampleSpecs&
-GrRenderTargetPriv::getMultisampleSpecs(const GrStencilSettings& stencil) const {
+GrRenderTargetPriv::getMultisampleSpecs(const GrPipeline& pipeline) const {
+ SkASSERT(fRenderTarget == pipeline.getRenderTarget()); // TODO: remove RT from pipeline.
GrGpu* gpu = fRenderTarget->getGpu();
if (auto id = fRenderTarget->fMultisampleSpecsID) {
- SkASSERT(gpu->queryMultisampleSpecs(fRenderTarget, stencil).fUniqueID == id);
+ SkASSERT(gpu->queryMultisampleSpecs(pipeline).fUniqueID == id);
return gpu->getMultisampleSpecs(id);
}
- const GrGpu::MultisampleSpecs& specs = gpu->queryMultisampleSpecs(fRenderTarget, stencil);
+ const GrGpu::MultisampleSpecs& specs = gpu->queryMultisampleSpecs(pipeline);
fRenderTarget->fMultisampleSpecsID = specs.fUniqueID;
return specs;
}
« no previous file with comments | « src/gpu/GrReducedClip.cpp ('k') | src/gpu/GrRenderTargetPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698