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

Side by Side Diff: src/gpu/GrCommandBuilder.h

Issue 1131553002: Isolate GrBufferAllocPools inside GrBatchTarget (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT Created 5 years, 7 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/GrBufferAllocPool.cpp ('k') | src/gpu/GrContext.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 2015 Google Inc. 2 * Copyright 2015 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 GrCommandBuilder_DEFINED 8 #ifndef GrCommandBuilder_DEFINED
9 #define GrCommandBuilder_DEFINED 9 #define GrCommandBuilder_DEFINED
10 10
11 #include "GrTargetCommands.h" 11 #include "GrTargetCommands.h"
12 12
13 class GrInOrderDrawBuffer; 13 class GrInOrderDrawBuffer;
14 class GrVertexBufferAllocPool;
15 class GrIndexBufferAllocPool;
16 14
17 class GrCommandBuilder : ::SkNoncopyable { 15 class GrCommandBuilder : ::SkNoncopyable {
18 public: 16 public:
19 typedef GrTargetCommands::Cmd Cmd; 17 typedef GrTargetCommands::Cmd Cmd;
20 typedef GrTargetCommands::State State; 18 typedef GrTargetCommands::State State;
21 19
22 GrCommandBuilder(GrGpu* gpu, 20 GrCommandBuilder(GrGpu* gpu) : fCommands(gpu) { }
23 GrVertexBufferAllocPool* vertexPool,
24 GrIndexBufferAllocPool* indexPool)
25 : fCommands(gpu, vertexPool, indexPool) {
26 }
27 21
28 virtual ~GrCommandBuilder() {} 22 virtual ~GrCommandBuilder() {}
29 23
30 void reset() { fCommands.reset(); } 24 void reset() { fCommands.reset(); }
31 void flush(GrInOrderDrawBuffer* iodb) { fCommands.flush(iodb); } 25 void flush(GrInOrderDrawBuffer* iodb) { fCommands.flush(iodb); }
32 26
33 virtual Cmd* recordClearStencilClip(const SkIRect& rect, 27 virtual Cmd* recordClearStencilClip(const SkIRect& rect,
34 bool insideClip, 28 bool insideClip,
35 GrRenderTarget* renderTarget); 29 GrRenderTarget* renderTarget);
36 virtual Cmd* recordDiscard(GrRenderTarget*); 30 virtual Cmd* recordDiscard(GrRenderTarget*);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 71
78 GrTargetCommands::CmdBuffer* cmdBuffer() { return fCommands.cmdBuffer(); } 72 GrTargetCommands::CmdBuffer* cmdBuffer() { return fCommands.cmdBuffer(); }
79 GrBatchTarget* batchTarget() { return fCommands.batchTarget(); } 73 GrBatchTarget* batchTarget() { return fCommands.batchTarget(); }
80 74
81 private: 75 private:
82 GrTargetCommands fCommands; 76 GrTargetCommands fCommands;
83 77
84 }; 78 };
85 79
86 #endif 80 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrBufferAllocPool.cpp ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698