| 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 | 194 |
| 195 bool quickInsideClip(const SkRect& devBounds); | 195 bool quickInsideClip(const SkRect& devBounds); |
| 196 | 196 |
| 197 virtual void didAddGpuTraceMarker() SK_OVERRIDE {} | 197 virtual void didAddGpuTraceMarker() SK_OVERRIDE {} |
| 198 virtual void didRemoveGpuTraceMarker() SK_OVERRIDE {} | 198 virtual void didRemoveGpuTraceMarker() SK_OVERRIDE {} |
| 199 | 199 |
| 200 // Attempts to concat instances from info onto the previous draw. info must
represent an | 200 // Attempts to concat instances from info onto the previous draw. info must
represent an |
| 201 // instanced draw. The caller must have already recorded a new draw state an
d clip if necessary. | 201 // instanced draw. The caller must have already recorded a new draw state an
d clip if necessary. |
| 202 int concatInstancedDraw(const DrawInfo& info); | 202 int concatInstancedDraw(const DrawInfo& info); |
| 203 | 203 |
| 204 // we lazily record state and clip changes in order to skip clips and states
that have no | 204 // Determines whether the current draw operation requieres a new drawstate a
nd if so records it. |
| 205 // effect. | 205 void recordStateIfNecessary(); |
| 206 bool needsNewState() const; | 206 // We lazily record clip changes in order to skip clips that have no effect. |
| 207 bool needsNewClip() const; | 207 bool needsNewClip() const; |
| 208 | 208 |
| 209 // these functions record a command | 209 // these functions record a command |
| 210 void recordState(); | 210 void recordState(); |
| 211 void recordClip(); | 211 void recordClip(); |
| 212 DrawRecord* recordDraw(const DrawInfo&); | 212 DrawRecord* recordDraw(const DrawInfo&); |
| 213 StencilPath* recordStencilPath(); | 213 StencilPath* recordStencilPath(); |
| 214 DrawPath* recordDrawPath(); | 214 DrawPath* recordDrawPath(); |
| 215 DrawPaths* recordDrawPaths(); | 215 DrawPaths* recordDrawPaths(); |
| 216 Clear* recordClear(); | 216 Clear* recordClear(); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 | 285 |
| 286 void addToCmdBuffer(uint8_t cmd); | 286 void addToCmdBuffer(uint8_t cmd); |
| 287 | 287 |
| 288 bool fFlushing; | 288 bool fFlushing; |
| 289 uint32_t fDrawID; | 289 uint32_t fDrawID; |
| 290 | 290 |
| 291 typedef GrDrawTarget INHERITED; | 291 typedef GrDrawTarget INHERITED; |
| 292 }; | 292 }; |
| 293 | 293 |
| 294 #endif | 294 #endif |
| OLD | NEW |