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

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

Issue 1278643006: Make GrBatch carry its own GrPipeline (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more Created 5 years, 4 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/GrBufferedDrawTarget.cpp ('k') | src/gpu/GrDrawTarget.h » ('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 GrBufferedDrawTarget; 13 class GrBufferedDrawTarget;
14 14
15 class GrCommandBuilder : ::SkNoncopyable { 15 class GrCommandBuilder : ::SkNoncopyable {
16 public: 16 public:
17 typedef GrTargetCommands::Cmd Cmd; 17 typedef GrTargetCommands::Cmd Cmd;
18 typedef GrTargetCommands::State State; 18 typedef GrTargetCommands::StateForPathDraw State;
19 19
20 static GrCommandBuilder* Create(GrGpu* gpu, bool reorder); 20 static GrCommandBuilder* Create(GrGpu* gpu, bool reorder);
21 21
22 virtual ~GrCommandBuilder() {} 22 virtual ~GrCommandBuilder() {}
23 23
24 void reset() { fCommands.reset(); } 24 void reset() { fCommands.reset(); }
25 void flush(GrBufferedDrawTarget* bufferedDrawTarget) { fCommands.flush(buffe redDrawTarget); } 25 void flush(GrBufferedDrawTarget* bufferedDrawTarget) { fCommands.flush(buffe redDrawTarget); }
26 26
27 virtual Cmd* recordClearStencilClip(const SkIRect& rect, 27 virtual Cmd* recordClearStencilClip(const SkIRect& rect,
28 bool insideClip, 28 bool insideClip,
29 GrRenderTarget* renderTarget); 29 GrRenderTarget* renderTarget);
30 virtual Cmd* recordDiscard(GrRenderTarget*); 30 virtual Cmd* recordDiscard(GrRenderTarget*);
31 virtual Cmd* recordDrawBatch(const State*, const GrPipelineOptimizations&, G rBatch*) = 0; 31 virtual Cmd* recordDrawBatch(GrBatch*) = 0;
32 virtual Cmd* recordStencilPath(const GrPipelineBuilder&, 32 virtual Cmd* recordStencilPath(const GrPipelineBuilder&,
33 const GrPathProcessor*, 33 const GrPathProcessor*,
34 const GrPath*, 34 const GrPath*,
35 const GrScissorState&, 35 const GrScissorState&,
36 const GrStencilSettings&) = 0; 36 const GrStencilSettings&) = 0;
37 virtual Cmd* recordDrawPath(State*, 37 virtual Cmd* recordDrawPath(State*,
38 const GrPathProcessor*, 38 const GrPathProcessor*,
39 const GrPath*, 39 const GrPath*,
40 const GrStencilSettings&) = 0; 40 const GrStencilSettings&) = 0;
41 virtual Cmd* recordDrawPaths(State*, 41 virtual Cmd* recordDrawPaths(State*,
(...skipping 30 matching lines...) Expand all
72 72
73 GrTargetCommands::CmdBuffer* cmdBuffer() { return fCommands.cmdBuffer(); } 73 GrTargetCommands::CmdBuffer* cmdBuffer() { return fCommands.cmdBuffer(); }
74 GrBatchTarget* batchTarget() { return fCommands.batchTarget(); } 74 GrBatchTarget* batchTarget() { return fCommands.batchTarget(); }
75 75
76 private: 76 private:
77 GrTargetCommands fCommands; 77 GrTargetCommands fCommands;
78 78
79 }; 79 };
80 80
81 #endif 81 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrBufferedDrawTarget.cpp ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698