Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(345)

Unified Diff: src/gpu/gl/GrGLGpuCommandBuffer.h

Issue 2078483002: Start using GrGpuCommandBuffer in GrDrawTarget. (Closed) Base URL: https://skia.googlesource.com/skia.git@memoryWAR
Patch Set: review nits Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
};
« src/gpu/gl/GrGLGpu.h ('K') | « src/gpu/gl/GrGLGpu.cpp ('k') | src/gpu/vk/GrVkCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698