| Index: src/gpu/GrImmediateDrawTarget.cpp
|
| diff --git a/src/gpu/GrImmediateDrawTarget.cpp b/src/gpu/GrImmediateDrawTarget.cpp
|
| index 0c4210ad705280cb94dbc4f1c2ce49ed825f485b..0099b1dc8cab705582a694af5609b31a8ee378e8 100644
|
| --- a/src/gpu/GrImmediateDrawTarget.cpp
|
| +++ b/src/gpu/GrImmediateDrawTarget.cpp
|
| @@ -27,8 +27,10 @@ GrImmediateDrawTarget::~GrImmediateDrawTarget() {
|
| void GrImmediateDrawTarget::onDrawBatch(GrBatch* batch,
|
| const PipelineInfo& pipelineInfo) {
|
| SkAlignedSStorage<sizeof(GrPipeline)> pipelineStorage;
|
| + bool shouldDraw = this->setupPipelineAndShouldDraw(pipelineStorage.get(), pipelineInfo);
|
| GrPipeline* pipeline = reinterpret_cast<GrPipeline*>(pipelineStorage.get());
|
| - if (!this->setupPipelineAndShouldDraw(pipeline, pipelineInfo)) {
|
| +
|
| + if (!shouldDraw) {
|
| pipeline->~GrPipeline();
|
| return;
|
| }
|
| @@ -82,9 +84,9 @@ void GrImmediateDrawTarget::onFlush() {
|
| }
|
|
|
| bool
|
| -GrImmediateDrawTarget::setupPipelineAndShouldDraw(GrPipeline* pipeline,
|
| +GrImmediateDrawTarget::setupPipelineAndShouldDraw(void* pipelineAddr,
|
| const GrDrawTarget::PipelineInfo& pipelineInfo) {
|
| - this->setupPipeline(pipelineInfo, pipeline);
|
| + const GrPipeline* pipeline = this->setupPipeline(pipelineInfo, pipelineAddr);
|
|
|
| if (pipeline->mustSkip()) {
|
| return false;
|
|
|