diff options
author | Robert Phillips <robertphillips@google.com> | 2017-08-09 09:30:51 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-08-09 14:30:54 +0000 |
commit | 19e51dcd1eb0bcdc70f29620ce4ca30ddbfc2042 (patch) | |
tree | 19639614fa3494f150b97c4dd9bf9b07b69474fa /src/gpu/mock | |
parent | 69fd008199989c5a5a96f992dcaa4089b63f490f (diff) |
Store GrRenderTarget in GrGpuCommandBuffer
Change-Id: I545d53ffb5f9d450b87a360516b03bdd47232a70
Reviewed-on: https://skia-review.googlesource.com/32460
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/mock')
-rw-r--r-- | src/gpu/mock/GrMockGpu.cpp | 4 | ||||
-rw-r--r-- | src/gpu/mock/GrMockGpuCommandBuffer.h | 18 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/gpu/mock/GrMockGpu.cpp b/src/gpu/mock/GrMockGpu.cpp index d97c789158..397e1a1ca9 100644 --- a/src/gpu/mock/GrMockGpu.cpp +++ b/src/gpu/mock/GrMockGpu.cpp @@ -40,10 +40,10 @@ GrGpu* GrMockGpu::Create(const GrMockOptions* mockOptions, const GrContextOption GrGpuCommandBuffer* GrMockGpu::createCommandBuffer( - GrRenderTarget*, GrSurfaceOrigin, + GrRenderTarget* rt, GrSurfaceOrigin origin, const GrGpuCommandBuffer::LoadAndStoreInfo&, const GrGpuCommandBuffer::StencilLoadAndStoreInfo&) { - return new GrMockGpuCommandBuffer(this); + return new GrMockGpuCommandBuffer(this, rt, origin); } void GrMockGpu::submitCommandBuffer(const GrMockGpuCommandBuffer* cmdBuffer) { diff --git a/src/gpu/mock/GrMockGpuCommandBuffer.h b/src/gpu/mock/GrMockGpuCommandBuffer.h index d2f6baf400..6a780972af 100644 --- a/src/gpu/mock/GrMockGpuCommandBuffer.h +++ b/src/gpu/mock/GrMockGpuCommandBuffer.h @@ -13,13 +13,15 @@ class GrMockGpuCommandBuffer : public GrGpuCommandBuffer { public: - GrMockGpuCommandBuffer(GrMockGpu* gpu) : fGpu(gpu) {} + GrMockGpuCommandBuffer(GrMockGpu* gpu, GrRenderTarget* rt, GrSurfaceOrigin origin) + : INHERITED(rt, origin) + , fGpu(gpu) { + } GrGpu* gpu() override { return fGpu; } - void inlineUpload(GrOpFlushState*, GrDrawOp::DeferredUploadFn&, - GrRenderTargetProxy*) override {} - void discard(GrRenderTargetProxy*) override {} - void insertEventMarker(GrRenderTargetProxy*, const char*) override {} + void inlineUpload(GrOpFlushState*, GrDrawOp::DeferredUploadFn&) override {} + void discard() override {} + void insertEventMarker(const char*) override {} void begin() override {} void end() override {} @@ -31,10 +33,8 @@ private: const GrPipeline::DynamicState[], int meshCount, const SkRect& bounds) override { ++fNumDraws; } - void onClear(GrRenderTargetProxy*, const GrFixedClip&, GrColor) override {} - void onClearStencilClip(GrRenderTargetProxy*, const GrFixedClip&, - bool insideStencilMask) override {} - GrRenderTarget* renderTarget() override { return nullptr; } + void onClear(const GrFixedClip&, GrColor) override {} + void onClearStencilClip(const GrFixedClip&, bool insideStencilMask) override {} GrMockGpu* fGpu; int fNumDraws = 0; |