OLD | NEW |
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 GrTargetCommands_DEFINED | 8 #ifndef GrTargetCommands_DEFINED |
9 #define GrTargetCommands_DEFINED | 9 #define GrTargetCommands_DEFINED |
10 | 10 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 private: | 69 private: |
70 friend class GrCommandBuilder; | 70 friend class GrCommandBuilder; |
71 friend class GrBufferedDrawTarget; // This goes away when State becomes just
a pipeline | 71 friend class GrBufferedDrawTarget; // This goes away when State becomes just
a pipeline |
72 friend class GrReorderCommandBuilder; | 72 friend class GrReorderCommandBuilder; |
73 | 73 |
74 typedef GrGpu::DrawArgs DrawArgs; | 74 typedef GrGpu::DrawArgs DrawArgs; |
75 | 75 |
76 // TODO: This can be just a pipeline once paths are in batch, and it should
live elsewhere | 76 // TODO: This can be just a pipeline once paths are in batch, and it should
live elsewhere |
77 struct StateForPathDraw : public SkNVRefCnt<StateForPathDraw> { | 77 struct StateForPathDraw : public SkNVRefCnt<StateForPathDraw> { |
78 // TODO get rid of the prim proc parameter when we use batch everywhere | 78 // TODO get rid of the prim proc parameter when we use batch everywhere |
79 StateForPathDraw(const GrPrimitiveProcessor* primProc = NULL) | 79 StateForPathDraw(const GrPrimitiveProcessor* primProc = nullptr) |
80 : fPrimitiveProcessor(primProc) | 80 : fPrimitiveProcessor(primProc) |
81 , fCompiled(false) {} | 81 , fCompiled(false) {} |
82 | 82 |
83 ~StateForPathDraw() { reinterpret_cast<GrPipeline*>(fPipeline.get())->~G
rPipeline(); } | 83 ~StateForPathDraw() { reinterpret_cast<GrPipeline*>(fPipeline.get())->~G
rPipeline(); } |
84 | 84 |
85 // This function is only for getting the location in memory where we wil
l create our | 85 // This function is only for getting the location in memory where we wil
l create our |
86 // pipeline object. | 86 // pipeline object. |
87 void* pipelineLocation() { return fPipeline.get(); } | 87 void* pipelineLocation() { return fPipeline.get(); } |
88 | 88 |
89 const GrPipeline* getPipeline() const { | 89 const GrPipeline* getPipeline() const { |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 typedef void* TCmdAlign; // This wouldn't be enough align if a command used
long double. | 174 typedef void* TCmdAlign; // This wouldn't be enough align if a command used
long double. |
175 typedef GrTRecorder<Cmd, TCmdAlign> CmdBuffer; | 175 typedef GrTRecorder<Cmd, TCmdAlign> CmdBuffer; |
176 | 176 |
177 CmdBuffer* cmdBuffer() { return &fCmdBuffer; } | 177 CmdBuffer* cmdBuffer() { return &fCmdBuffer; } |
178 | 178 |
179 CmdBuffer fCmdBuffer; | 179 CmdBuffer fCmdBuffer; |
180 GrBatchToken fLastFlushToken; | 180 GrBatchToken fLastFlushToken; |
181 }; | 181 }; |
182 | 182 |
183 #endif | 183 #endif |
OLD | NEW |