| 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 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 * and the other is left empty. The merged batch becomes responsible for drawing
the data from both | 32 * and the other is left empty. The merged batch becomes responsible for drawing
the data from both |
| 33 * the original batches. | 33 * the original batches. |
| 34 * | 34 * |
| 35 * If there are any possible optimizations which might require knowing more abou
t the full state of | 35 * If there are any possible optimizations which might require knowing more abou
t the full state of |
| 36 * the draw, ie whether or not the GrBatch is allowed to tweak alpha for coverag
e, then this | 36 * the draw, ie whether or not the GrBatch is allowed to tweak alpha for coverag
e, then this |
| 37 * information will be communicated to the GrBatch prior to geometry generation. | 37 * information will be communicated to the GrBatch prior to geometry generation. |
| 38 */ | 38 */ |
| 39 | 39 |
| 40 class GrBatch : public SkRefCnt { | 40 class GrBatch : public SkRefCnt { |
| 41 public: | 41 public: |
| 42 SK_DECLARE_INST_COUNT(GrBatch) | 42 |
| 43 GrBatch() : fClassID(kIllegalBatchClassID), fNumberOfDraws(0) { SkDEBUGCODE(
fUsed = false;) } | 43 GrBatch() : fClassID(kIllegalBatchClassID), fNumberOfDraws(0) { SkDEBUGCODE(
fUsed = false;) } |
| 44 virtual ~GrBatch() {} | 44 virtual ~GrBatch() {} |
| 45 | 45 |
| 46 virtual const char* name() const = 0; | 46 virtual const char* name() const = 0; |
| 47 virtual void getInvariantOutputColor(GrInitInvariantOutput* out) const = 0; | 47 virtual void getInvariantOutputColor(GrInitInvariantOutput* out) const = 0; |
| 48 virtual void getInvariantOutputCoverage(GrInitInvariantOutput* out) const =
0; | 48 virtual void getInvariantOutputCoverage(GrInitInvariantOutput* out) const =
0; |
| 49 | 49 |
| 50 /* | 50 /* |
| 51 * initBatchTracker is a hook for the some additional overrides / optimizati
on possibilities | 51 * initBatchTracker is a hook for the some additional overrides / optimizati
on possibilities |
| 52 * from the GrXferProcessor. | 52 * from the GrXferProcessor. |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 static int32_t gCurrBatchClassID; | 169 static int32_t gCurrBatchClassID; |
| 170 | 170 |
| 171 SkDEBUGCODE(bool fUsed;) | 171 SkDEBUGCODE(bool fUsed;) |
| 172 | 172 |
| 173 int fNumberOfDraws; | 173 int fNumberOfDraws; |
| 174 | 174 |
| 175 typedef SkRefCnt INHERITED; | 175 typedef SkRefCnt INHERITED; |
| 176 }; | 176 }; |
| 177 | 177 |
| 178 #endif | 178 #endif |
| OLD | NEW |