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

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

Issue 1293973003: Path stenciling in GrBatch (Closed) Base URL: https://skia.googlesource.com/skia.git@rmcode
Patch Set: header order tweak 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 GrGpu; 13 class GrGpu;
14 class GrResourceProvider; 14 class GrResourceProvider;
15 class GrBufferedDrawTarget; 15 class GrBufferedDrawTarget;
16 16
17 class GrCommandBuilder : ::SkNoncopyable { 17 class GrCommandBuilder : ::SkNoncopyable {
18 public: 18 public:
19 typedef GrTargetCommands::Cmd Cmd; 19 typedef GrTargetCommands::Cmd Cmd;
20 typedef GrTargetCommands::StateForPathDraw State; 20 typedef GrTargetCommands::StateForPathDraw State;
21 21
22 static GrCommandBuilder* Create(GrGpu* gpu, bool reorder); 22 static GrCommandBuilder* Create(GrGpu* gpu, bool reorder);
23 23
24 virtual ~GrCommandBuilder() {} 24 virtual ~GrCommandBuilder() {}
25 25
26 void reset() { fCommands.reset(); } 26 void reset() { fCommands.reset(); }
27 void flush(GrGpu* gpu, GrResourceProvider* rp) { fCommands.flush(gpu, rp); } 27 void flush(GrGpu* gpu, GrResourceProvider* rp) { fCommands.flush(gpu, rp); }
28 28
29 virtual Cmd* recordDrawBatch(GrBatch*, const GrCaps&) = 0; 29 virtual Cmd* recordDrawBatch(GrBatch*, const GrCaps&) = 0;
30 virtual Cmd* recordStencilPath(const GrPipelineBuilder&,
31 const GrPathProcessor*,
32 const GrPath*,
33 const GrScissorState&,
34 const GrStencilSettings&) = 0;
35 virtual Cmd* recordDrawPath(State*, 30 virtual Cmd* recordDrawPath(State*,
36 const GrPathProcessor*, 31 const GrPathProcessor*,
37 const GrPath*, 32 const GrPath*,
38 const GrStencilSettings&) = 0; 33 const GrStencilSettings&) = 0;
39 virtual Cmd* recordDrawPaths(State*, 34 virtual Cmd* recordDrawPaths(State*,
40 GrBufferedDrawTarget*, 35 GrBufferedDrawTarget*,
41 const GrPathProcessor*, 36 const GrPathProcessor*,
42 const GrPathRange*, 37 const GrPathRange*,
43 const void*, 38 const void*,
44 GrDrawTarget::PathIndexType, 39 GrDrawTarget::PathIndexType,
45 const float transformValues[], 40 const float transformValues[],
46 GrDrawTarget::PathTransformType , 41 GrDrawTarget::PathTransformType ,
47 int, 42 int,
48 const GrStencilSettings&, 43 const GrStencilSettings&,
49 const GrPipelineOptimizations&) = 0; 44 const GrPipelineOptimizations&) = 0;
50 45
51 protected: 46 protected:
52 typedef GrTargetCommands::DrawBatch DrawBatch; 47 typedef GrTargetCommands::DrawBatch DrawBatch;
53 typedef GrTargetCommands::StencilPath StencilPath;
54 typedef GrTargetCommands::DrawPath DrawPath; 48 typedef GrTargetCommands::DrawPath DrawPath;
55 typedef GrTargetCommands::DrawPaths DrawPaths; 49 typedef GrTargetCommands::DrawPaths DrawPaths;
56 50
57 GrCommandBuilder() {} 51 GrCommandBuilder() {}
58 52
59 GrTargetCommands::CmdBuffer* cmdBuffer() { return fCommands.cmdBuffer(); } 53 GrTargetCommands::CmdBuffer* cmdBuffer() { return fCommands.cmdBuffer(); }
60 private: 54 private:
61 GrTargetCommands fCommands; 55 GrTargetCommands fCommands;
62 56
63 }; 57 };
64 58
65 #endif 59 #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