| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 GrBufferedDrawTarget_DEFINED | 8 #ifndef GrBufferedDrawTarget_DEFINED |
| 9 #define GrBufferedDrawTarget_DEFINED | 9 #define GrBufferedDrawTarget_DEFINED |
| 10 | 10 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 friend class GrInOrderCommandBuilder; | 57 friend class GrInOrderCommandBuilder; |
| 58 friend class GrTargetCommands; | 58 friend class GrTargetCommands; |
| 59 | 59 |
| 60 typedef GrTargetCommands::StateForPathDraw StateForPathDraw; | 60 typedef GrTargetCommands::StateForPathDraw StateForPathDraw; |
| 61 | 61 |
| 62 StateForPathDraw* allocState(const GrPrimitiveProcessor* primProc = NULL) { | 62 StateForPathDraw* allocState(const GrPrimitiveProcessor* primProc = NULL) { |
| 63 void* allocation = fPipelineBuffer.alloc(sizeof(StateForPathDraw), | 63 void* allocation = fPipelineBuffer.alloc(sizeof(StateForPathDraw), |
| 64 SkChunkAlloc::kThrow_AllocFailT
ype); | 64 SkChunkAlloc::kThrow_AllocFailT
ype); |
| 65 return SkNEW_PLACEMENT_ARGS(allocation, StateForPathDraw, (primProc)); | 65 return new (allocation) StateForPathDraw(primProc); |
| 66 } | 66 } |
| 67 | 67 |
| 68 void unallocState(StateForPathDraw* state) { | 68 void unallocState(StateForPathDraw* state) { |
| 69 state->unref(); | 69 state->unref(); |
| 70 fPipelineBuffer.unalloc(state); | 70 fPipelineBuffer.unalloc(state); |
| 71 } | 71 } |
| 72 | 72 |
| 73 void onReset() override; | 73 void onReset() override; |
| 74 void onFlush() override; | 74 void onFlush() override; |
| 75 | 75 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 105 SkChunkAlloc fPathIndexBuffer; | 105 SkChunkAlloc fPathIndexBuffer; |
| 106 SkChunkAlloc fPathTransformBuffer; | 106 SkChunkAlloc fPathTransformBuffer; |
| 107 SkChunkAlloc fPipelineBuffer; | 107 SkChunkAlloc fPipelineBuffer; |
| 108 uint32_t fDrawID; | 108 uint32_t fDrawID; |
| 109 SkAutoTUnref<StateForPathDraw> fPrevState; | 109 SkAutoTUnref<StateForPathDraw> fPrevState; |
| 110 | 110 |
| 111 typedef GrClipTarget INHERITED; | 111 typedef GrClipTarget INHERITED; |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 #endif | 114 #endif |
| OLD | NEW |