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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 struct State : public SkNVRefCnt<State> { | 76 struct State : public SkNVRefCnt<State> { |
77 // TODO get rid of the prim proc parameter when we use batch everywhere | 77 // TODO get rid of the prim proc parameter when we use batch everywhere |
78 State(const GrPrimitiveProcessor* primProc = NULL) | 78 State(const GrPrimitiveProcessor* primProc = NULL) |
79 : fPrimitiveProcessor(primProc) | 79 : fPrimitiveProcessor(primProc) |
80 , fCompiled(false) {} | 80 , fCompiled(false) {} |
81 | 81 |
82 ~State() { reinterpret_cast<GrPipeline*>(fPipeline.get())->~GrPipeline()
; } | 82 ~State() { reinterpret_cast<GrPipeline*>(fPipeline.get())->~GrPipeline()
; } |
83 | 83 |
84 // This function is only for getting the location in memory where we wil
l create our | 84 // This function is only for getting the location in memory where we wil
l create our |
85 // pipeline object. | 85 // pipeline object. |
86 GrPipeline* pipelineLocation() { return reinterpret_cast<GrPipeline*>(fP
ipeline.get()); } | 86 void* pipelineLocation() { return fPipeline.get(); } |
87 | 87 |
88 const GrPipeline* getPipeline() const { | 88 const GrPipeline* getPipeline() const { |
89 return reinterpret_cast<const GrPipeline*>(fPipeline.get()); | 89 return reinterpret_cast<const GrPipeline*>(fPipeline.get()); |
90 } | 90 } |
91 GrRenderTarget* getRenderTarget() const { | 91 GrRenderTarget* getRenderTarget() const { |
92 return this->getPipeline()->getRenderTarget(); | 92 return this->getPipeline()->getRenderTarget(); |
93 } | 93 } |
94 const GrXferProcessor* getXferProcessor() const { | 94 const GrXferProcessor* getXferProcessor() const { |
95 return this->getPipeline()->getXferProcessor(); | 95 return this->getPipeline()->getXferProcessor(); |
96 } | 96 } |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 | 263 |
264 CmdBuffer* cmdBuffer() { return &fCmdBuffer; } | 264 CmdBuffer* cmdBuffer() { return &fCmdBuffer; } |
265 GrBatchTarget* batchTarget() { return &fBatchTarget; } | 265 GrBatchTarget* batchTarget() { return &fBatchTarget; } |
266 | 266 |
267 CmdBuffer fCmdBuffer; | 267 CmdBuffer fCmdBuffer; |
268 GrBatchTarget fBatchTarget; | 268 GrBatchTarget fBatchTarget; |
269 }; | 269 }; |
270 | 270 |
271 #endif | 271 #endif |
272 | 272 |
OLD | NEW |