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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 virtual ~GrBatch() {} | 57 virtual ~GrBatch() {} |
58 | 58 |
59 virtual const char* name() const = 0; | 59 virtual const char* name() const = 0; |
60 virtual void getInvariantOutputColor(GrInitInvariantOutput* out) const = 0; | 60 virtual void getInvariantOutputColor(GrInitInvariantOutput* out) const = 0; |
61 virtual void getInvariantOutputCoverage(GrInitInvariantOutput* out) const =
0; | 61 virtual void getInvariantOutputCoverage(GrInitInvariantOutput* out) const =
0; |
62 | 62 |
63 /* | 63 /* |
64 * initBatchTracker is a hook for the some additional overrides / optimizati
on possibilities | 64 * initBatchTracker is a hook for the some additional overrides / optimizati
on possibilities |
65 * from the GrXferProcessor. | 65 * from the GrXferProcessor. |
66 */ | 66 */ |
67 virtual void initBatchTracker(const GrPipelineInfo& init) = 0; | 67 virtual void initBatchTracker(const GrPipelineOptimizations&) = 0; |
68 | 68 |
69 bool combineIfPossible(GrBatch* that) { | 69 bool combineIfPossible(GrBatch* that) { |
70 if (this->classID() != that->classID()) { | 70 if (this->classID() != that->classID()) { |
71 return false; | 71 return false; |
72 } | 72 } |
73 | 73 |
74 return this->onCombineIfPossible(that); | 74 return this->onCombineIfPossible(that); |
75 } | 75 } |
76 | 76 |
77 virtual bool onCombineIfPossible(GrBatch*) = 0; | 77 virtual bool onCombineIfPossible(GrBatch*) = 0; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 SkDEBUGCODE(bool fUsed;) | 191 SkDEBUGCODE(bool fUsed;) |
192 #if GR_BATCH_SPEW | 192 #if GR_BATCH_SPEW |
193 static int32_t gCurrBatchUniqueID; | 193 static int32_t gCurrBatchUniqueID; |
194 uint32_t fUniqueID; | 194 uint32_t fUniqueID; |
195 #endif | 195 #endif |
196 | 196 |
197 typedef SkRefCnt INHERITED; | 197 typedef SkRefCnt INHERITED; |
198 }; | 198 }; |
199 | 199 |
200 #endif | 200 #endif |
OLD | NEW |