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

Side by Side 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: remove errant lines 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 unified diff | Download patch
« no previous file with comments | « src/gpu/gl/GrGLGpu.cpp ('k') | src/gpu/vk/GrVkCaps.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrGLGpuCommandBuffer_DEFINED 8 #ifndef GrGLGpuCommandBuffer_DEFINED
9 #define GrGLGpuCommandBuffer_DEFINED 9 #define GrGLGpuCommandBuffer_DEFINED
10 10
11 #include "GrGpuCommandBuffer.h" 11 #include "GrGpuCommandBuffer.h"
12 12
13 class GrGLGpu; 13 #include "GrGLGpu.h"
14 14
15 class GrGLGpuCommandBuffer : public GrGpuCommandBuffer { 15 class GrGLGpuCommandBuffer : public GrGpuCommandBuffer {
16 /**
17 * We do not actually buffer up draws or do any work in the this class for GL. I nstead commands
18 * are immediately sent to the gpu to execute. Thus all the commands in this cla ss are simply
19 * pass through functions to corresponding calls in the GrGLGpu class.
20 */
16 public: 21 public:
17 GrGLGpuCommandBuffer(GrGLGpu* gpu) /*: fGpu(gpu)*/ {} 22 GrGLGpuCommandBuffer(GrGLGpu* gpu) : fGpu(gpu) {}
18 23
19 virtual ~GrGLGpuCommandBuffer() {} 24 virtual ~GrGLGpuCommandBuffer() {}
20 25
21 void end() override {} 26 void end() override {}
22 27
23 void submit() override {} 28 void discard(GrRenderTarget* rt) override { fGpu->discard(rt); }
24 29
25 private: 30 private:
26 // commented out to appease clang compiler warning about unused private fiel d 31 GrGpu* gpu() override { return fGpu; }
27 // GrGLGpu* fGpu; 32
33 void onSubmit(const SkIRect& bounds) override {}
34
35 void onDraw(const GrPipeline& pipeline,
36 const GrPrimitiveProcessor& primProc,
37 const GrMesh* mesh,
38 int meshCount) override {
39 fGpu->draw(pipeline, primProc, mesh, meshCount);
40 }
41
42 void onClear(GrRenderTarget* rt, const SkIRect& rect, GrColor color) overrid e {
43 fGpu->clear(rect, color, rt);
44 }
45
46 void onClearStencilClip(GrRenderTarget* rt, const SkIRect& rect, bool inside Clip) override {
47 fGpu->clearStencilClip(rect, insideClip, rt);
48 }
49
50 GrGLGpu* fGpu;
28 51
29 typedef GrGpuCommandBuffer INHERITED; 52 typedef GrGpuCommandBuffer INHERITED;
30 }; 53 };
31 54
32 #endif 55 #endif
33 56
OLDNEW
« no previous file with comments | « 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