diff options
author | Brian Salomon <bsalomon@google.com> | 2016-11-29 17:09:20 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-11-29 22:58:26 +0000 |
commit | 2d38b22cc3885500edd19eaa2e388a5953f2c7df (patch) | |
tree | caba35a95492ca70224175684c59bfb247b7b2ad /src/gpu/batches | |
parent | 922e5be6e2494e46656ab3614c5395c6ff035a73 (diff) |
Make pipeline getter a GrDrawBatch::pipeline() a protected method.
This is a baby step towards making getting GrPipeline off GrDrawBatch.
Change-Id: I7e0331f3bcd45d1920a150fefb91e307efeeced1
Reviewed-on: https://skia-review.googlesource.com/5327
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/batches')
-rw-r--r-- | src/gpu/batches/GrDrawBatch.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gpu/batches/GrDrawBatch.h b/src/gpu/batches/GrDrawBatch.h index a5c153e903..af1de0dc77 100644 --- a/src/gpu/batches/GrDrawBatch.h +++ b/src/gpu/batches/GrDrawBatch.h @@ -64,11 +64,6 @@ public: */ void getPipelineOptimizations(GrPipelineOptimizations* override) const; - const GrPipeline* pipeline() const { - SkASSERT(fPipelineInstalled); - return reinterpret_cast<const GrPipeline*>(fPipelineStorage.get()); - } - bool installPipeline(const GrPipeline::CreateArgs&); // TODO no GrPrimitiveProcessors yet read fragment position @@ -77,13 +72,11 @@ public: // TODO: this needs to be updated to return GrSurfaceProxy::UniqueID // This is a bit more exciting than the other call sites since it uses the pipeline GrGpuResource::UniqueID renderTargetUniqueID() const final { - SkASSERT(fPipelineInstalled); return this->pipeline()->getRenderTarget()->uniqueID(); } // TODO: store a GrRenderTargetContext instead GrRenderTarget* renderTarget() const final { - SkASSERT(fPipelineInstalled); return this->pipeline()->getRenderTarget(); } @@ -121,6 +114,11 @@ public: } protected: + const GrPipeline* pipeline() const { + SkASSERT(fPipelineInstalled); + return reinterpret_cast<const GrPipeline*>(fPipelineStorage.get()); + } + virtual void computePipelineOptimizations(GrInitInvariantOutput* color, GrInitInvariantOutput* coverage, GrBatchToXPOverrides* overrides) const = 0; |