diff options
author | Robert Phillips <robertphillips@google.com> | 2017-07-26 15:48:41 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-07-26 20:59:00 +0000 |
commit | 2890fbfe1400b81e4d6af98d14dfe757fec93650 (patch) | |
tree | bbc22dc56d4cdb0b1f6b06740c68738808506f67 /src/gpu/GrOpFlushState.h | |
parent | 480c90afc4382d03fa7cda534a702459ace72953 (diff) |
Make GrPipeline hold a GrRenderTargetProxy (instead of a GrRenderTarget)
In a future world where GrSurface no longer has an origin it will be
useful for the GrPipeline to be holding the GrRenderTargetProxy (which will
still have an origin).
Change-Id: I743a8cc07b6b92f8116227fb77b7c37da43cde8a
Reviewed-on: https://skia-review.googlesource.com/26804
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrOpFlushState.h')
-rw-r--r-- | src/gpu/GrOpFlushState.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gpu/GrOpFlushState.h b/src/gpu/GrOpFlushState.h index a701965d4d..c73fee0a28 100644 --- a/src/gpu/GrOpFlushState.h +++ b/src/gpu/GrOpFlushState.h @@ -97,7 +97,9 @@ public: /** Additional data required on a per-op basis when executing GrDrawOps. */ struct DrawOpArgs { - GrRenderTarget* fRenderTarget; + GrRenderTarget* renderTarget() const { return fProxy->priv().peekRenderTarget(); } + + GrRenderTargetProxy* fProxy; const GrAppliedClip* fAppliedClip; GrXferProcessor::DstProxy fDstProxy; }; @@ -232,7 +234,7 @@ public: this->state()->putBackVertexSpace(vertices * vertexStride); } - GrRenderTarget* renderTarget() const { return this->state()->drawOpArgs().fRenderTarget; } + GrRenderTargetProxy* proxy() const { return this->state()->drawOpArgs().fProxy; } const GrAppliedClip* clip() const { return this->state()->drawOpArgs().fAppliedClip; } @@ -253,7 +255,7 @@ public: GrPipeline::InitArgs pipelineArgs; pipelineArgs.fFlags = pipelineFlags; pipelineArgs.fProcessors = processorSet; - pipelineArgs.fRenderTarget = this->renderTarget(); + pipelineArgs.fProxy = this->proxy(); pipelineArgs.fAppliedClip = this->clip(); pipelineArgs.fDstProxy = this->dstProxy(); pipelineArgs.fCaps = &this->caps(); |