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

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 938383004: Dynamically create stencil buffer when needed. (Closed) Base URL: https://skia.googlesource.com/skia.git@bigstencil
Patch Set: Actually save file before uploading Created 5 years, 10 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/GrDrawTarget.h ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.cpp
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index ffdd4dcdcd6075653d2705f11fde80ccc76efe6e..ee111a65351bcbbece4cc532fe800ba39dfc1645 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -14,6 +14,7 @@
#include "GrPath.h"
#include "GrPipeline.h"
#include "GrRenderTarget.h"
+#include "GrRenderTargetPriv.h"
#include "GrSurfacePriv.h"
#include "GrTemplates.h"
#include "GrTexture.h"
@@ -607,9 +608,9 @@ void GrDrawTarget::stencilPath(GrPipelineBuilder* pipelineBuilder,
// set stencil settings for path
GrStencilSettings stencilSettings;
- this->getPathStencilSettingsForFilltype(fill,
- pipelineBuilder->getRenderTarget()->getStencilBuffer(),
- &stencilSettings);
+ GrRenderTarget* rt = pipelineBuilder->getRenderTarget();
+ GrStencilBuffer* sb = rt->renderTargetPriv().attachStencilBuffer();
+ this->getPathStencilSettingsForFilltype(fill, sb, &stencilSettings);
this->onStencilPath(*pipelineBuilder, pathProc, path, scissorState, stencilSettings);
}
@@ -636,9 +637,9 @@ void GrDrawTarget::drawPath(GrPipelineBuilder* pipelineBuilder,
// set stencil settings for path
GrStencilSettings stencilSettings;
- this->getPathStencilSettingsForFilltype(fill,
- pipelineBuilder->getRenderTarget()->getStencilBuffer(),
- &stencilSettings);
+ GrRenderTarget* rt = pipelineBuilder->getRenderTarget();
+ GrStencilBuffer* sb = rt->renderTargetPriv().attachStencilBuffer();
+ this->getPathStencilSettingsForFilltype(fill, sb, &stencilSettings);
GrDrawTarget::PipelineInfo pipelineInfo(pipelineBuilder, &scissorState, pathProc, &devBounds,
this);
@@ -676,9 +677,9 @@ void GrDrawTarget::drawPaths(GrPipelineBuilder* pipelineBuilder,
// set stencil settings for path
GrStencilSettings stencilSettings;
- this->getPathStencilSettingsForFilltype(fill,
- pipelineBuilder->getRenderTarget()->getStencilBuffer(),
- &stencilSettings);
+ GrRenderTarget* rt = pipelineBuilder->getRenderTarget();
+ GrStencilBuffer* sb = rt->renderTargetPriv().attachStencilBuffer();
+ this->getPathStencilSettingsForFilltype(fill, sb, &stencilSettings);
// Don't compute a bounding box for dst copy texture, we'll opt
// instead for it to just copy the entire dst. Realistically this is a moot
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698