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 GrInOrderDrawBuffer_DEFINED | 8 #ifndef GrInOrderDrawBuffer_DEFINED |
9 #define GrInOrderDrawBuffer_DEFINED | 9 #define GrInOrderDrawBuffer_DEFINED |
10 | 10 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 const PipelineInfo&) override; | 105 const PipelineInfo&) override; |
106 void onClear(const SkIRect* rect, | 106 void onClear(const SkIRect* rect, |
107 GrColor color, | 107 GrColor color, |
108 bool canIgnoreRect, | 108 bool canIgnoreRect, |
109 GrRenderTarget* renderTarget) override; | 109 GrRenderTarget* renderTarget) override; |
110 void onCopySurface(GrSurface* dst, | 110 void onCopySurface(GrSurface* dst, |
111 GrSurface* src, | 111 GrSurface* src, |
112 const SkIRect& srcRect, | 112 const SkIRect& srcRect, |
113 const SkIPoint& dstPoint) override; | 113 const SkIPoint& dstPoint) override; |
114 | 114 |
115 // We lazily record clip changes in order to skip clips that have no effect. | |
116 void recordClipIfNecessary(); | |
117 // Records any trace markers for a command | 115 // Records any trace markers for a command |
118 void recordTraceMarkersIfNecessary(GrTargetCommands::Cmd*); | 116 void recordTraceMarkersIfNecessary(GrTargetCommands::Cmd*); |
119 SkString getCmdString(int index) const { | 117 SkString getCmdString(int index) const { |
120 SkASSERT(index < fGpuCmdMarkers.count()); | 118 SkASSERT(index < fGpuCmdMarkers.count()); |
121 return fGpuCmdMarkers[index].toString(); | 119 return fGpuCmdMarkers[index].toString(); |
122 } | 120 } |
123 bool isIssued(uint32_t drawID) override { return drawID != fDrawID; } | 121 bool isIssued(uint32_t drawID) override { return drawID != fDrawID; } |
124 | 122 |
125 State* SK_WARN_UNUSED_RESULT setupPipelineAndShouldDraw(const GrPrimitivePro
cessor*, | 123 State* SK_WARN_UNUSED_RESULT setupPipelineAndShouldDraw(const GrPrimitivePro
cessor*, |
126 const GrDrawTarget::
PipelineInfo&); | 124 const GrDrawTarget::
PipelineInfo&); |
(...skipping 16 matching lines...) Expand all Loading... |
143 SkChunkAlloc fPathIndexBuffer; | 141 SkChunkAlloc fPathIndexBuffer; |
144 SkChunkAlloc fPathTransformBuffer; | 142 SkChunkAlloc fPathTransformBuffer; |
145 SkChunkAlloc fPipelineBuffer; | 143 SkChunkAlloc fPipelineBuffer; |
146 uint32_t fDrawID; | 144 uint32_t fDrawID; |
147 SkAutoTUnref<State> fPrevState; | 145 SkAutoTUnref<State> fPrevState; |
148 | 146 |
149 typedef GrClipTarget INHERITED; | 147 typedef GrClipTarget INHERITED; |
150 }; | 148 }; |
151 | 149 |
152 #endif | 150 #endif |
OLD | NEW |