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>
diff --git a/src/gpu/mock/GrMockGpuCommandBuffer.h b/src/gpu/mock/GrMockGpuCommandBuffer.h
index d2f6baf..6a78097 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 @@
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;