| 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 GrBatch_DEFINED | 8 #ifndef GrBatch_DEFINED |
| 9 #define GrBatch_DEFINED | 9 #define GrBatch_DEFINED |
| 10 | 10 |
| 11 #include <new> | 11 #include "../private/SkAtomics.h" |
| 12 #include "GrNonAtomicRef.h" | 12 #include "GrNonAtomicRef.h" |
| 13 | |
| 14 #include "SkRect.h" | 13 #include "SkRect.h" |
| 15 #include "SkString.h" | 14 #include "SkString.h" |
| 16 | 15 |
| 16 #include <new> |
| 17 |
| 17 class GrCaps; | 18 class GrCaps; |
| 18 class GrBatchFlushState; | 19 class GrBatchFlushState; |
| 19 class GrRenderTarget; | 20 class GrRenderTarget; |
| 20 | 21 |
| 21 /** | 22 /** |
| 22 * GrBatch is the base class for all Ganesh deferred geometry generators. To fa
cilitate | 23 * GrBatch is the base class for all Ganesh deferred geometry generators. To fa
cilitate |
| 23 * reorderable batching, Ganesh does not generate geometry inline with draw call
s. Instead, it | 24 * reorderable batching, Ganesh does not generate geometry inline with draw call
s. Instead, it |
| 24 * captures the arguments to the draw and then generates the geometry on demand.
This gives GrBatch | 25 * captures the arguments to the draw and then generates the geometry on demand.
This gives GrBatch |
| 25 * subclasses complete freedom to decide how / what they can batch. | 26 * subclasses complete freedom to decide how / what they can batch. |
| 26 * | 27 * |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 158 |
| 158 SkDEBUGCODE(bool fUsed;) | 159 SkDEBUGCODE(bool fUsed;) |
| 159 const uint32_t fClassID; | 160 const uint32_t fClassID; |
| 160 static uint32_t GenBatchID() { return GenID(&gCurrBatchUniqueID); } | 161 static uint32_t GenBatchID() { return GenID(&gCurrBatchUniqueID); } |
| 161 mutable uint32_t fUniqueID; | 162 mutable uint32_t fUniqueID; |
| 162 static int32_t gCurrBatchUniqueID; | 163 static int32_t gCurrBatchUniqueID; |
| 163 static int32_t gCurrBatchClassID; | 164 static int32_t gCurrBatchClassID; |
| 164 }; | 165 }; |
| 165 | 166 |
| 166 #endif | 167 #endif |
| OLD | NEW |