Index: src/gpu/gl/GrGLGpuCommandBuffer.h |
diff --git a/src/gpu/gl/GrGLGpuCommandBuffer.h b/src/gpu/gl/GrGLGpuCommandBuffer.h |
index 8925322d4a3decb0384f84b6811886d4fa8661de..b96af3fd6b42f43e5a24fb287b0a3f7d483184af 100644 |
--- a/src/gpu/gl/GrGLGpuCommandBuffer.h |
+++ b/src/gpu/gl/GrGLGpuCommandBuffer.h |
@@ -10,21 +10,39 @@ |
#include "GrGpuCommandBuffer.h" |
-class GrGLGpu; |
+#include "GrGLGpu.h" |
class GrGLGpuCommandBuffer : public GrGpuCommandBuffer { |
bsalomon
2016/06/20 16:51:14
Comment that this is a passthrough back to the GL
egdaniel
2016/06/22 15:26:57
Done.
|
public: |
- GrGLGpuCommandBuffer(GrGLGpu* gpu) /*: fGpu(gpu)*/ {} |
+ GrGLGpuCommandBuffer(GrGLGpu* gpu) : fGpu(gpu) {} |
virtual ~GrGLGpuCommandBuffer() {} |
void end() override {} |
- void submit() override {} |
+ void discard(GrRenderTarget* rt) override { fGpu->discard(rt); } |
private: |
- // commented out to appease clang compiler warning about unused private field |
- // GrGLGpu* fGpu; |
+ GrGpu* gpu() override { return fGpu; } |
+ |
+ void onSubmit(const SkIRect& bounds) override {} |
+ |
+ void onDraw(const GrPipeline& pipeline, |
+ const GrPrimitiveProcessor& primProc, |
+ const GrMesh* mesh, |
+ int meshCount) override { |
+ fGpu->draw(pipeline, primProc, mesh, meshCount); |
+ } |
+ |
+ void onClear(GrRenderTarget* rt, const SkIRect& rect, GrColor color) override { |
+ fGpu->clear(rect, color, rt); |
+ } |
+ |
+ void onClearStencilClip(GrRenderTarget* rt, const SkIRect& rect, bool insideClip) override { |
+ fGpu->clearStencilClip(rect, insideClip, rt); |
+ } |
+ |
+ GrGLGpu* fGpu; |
typedef GrGpuCommandBuffer INHERITED; |
}; |