| 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 GrDrawBatch_DEFINED | 8 #ifndef GrDrawBatch_DEFINED |
| 9 #define GrDrawBatch_DEFINED | 9 #define GrDrawBatch_DEFINED |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 GrBatchToken fLastUploadToken; | 33 GrBatchToken fLastUploadToken; |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 /** | 36 /** |
| 37 * Base class for GrBatches that draw. These batches have a GrPipeline installed
by GrDrawTarget. | 37 * Base class for GrBatches that draw. These batches have a GrPipeline installed
by GrDrawTarget. |
| 38 */ | 38 */ |
| 39 class GrDrawBatch : public GrBatch { | 39 class GrDrawBatch : public GrBatch { |
| 40 public: | 40 public: |
| 41 class Target; | 41 class Target; |
| 42 | 42 |
| 43 GrDrawBatch(); | 43 GrDrawBatch(uint32_t classID); |
| 44 ~GrDrawBatch() override; | 44 ~GrDrawBatch() override; |
| 45 | 45 |
| 46 virtual void getInvariantOutputColor(GrInitInvariantOutput* out) const = 0; | 46 virtual void getInvariantOutputColor(GrInitInvariantOutput* out) const = 0; |
| 47 virtual void getInvariantOutputCoverage(GrInitInvariantOutput* out) const =
0; | 47 virtual void getInvariantOutputCoverage(GrInitInvariantOutput* out) const =
0; |
| 48 | 48 |
| 49 const GrPipeline* pipeline() const { | 49 const GrPipeline* pipeline() const { |
| 50 SkASSERT(fPipelineInstalled); | 50 SkASSERT(fPipelineInstalled); |
| 51 return reinterpret_cast<const GrPipeline*>(fPipelineStorage.get()); | 51 return reinterpret_cast<const GrPipeline*>(fPipelineStorage.get()); |
| 52 } | 52 } |
| 53 | 53 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 protected: | 85 protected: |
| 86 SkTArray<SkAutoTUnref<GrBatchUploader>, true> fInlineUploads; | 86 SkTArray<SkAutoTUnref<GrBatchUploader>, true> fInlineUploads; |
| 87 | 87 |
| 88 private: | 88 private: |
| 89 SkAlignedSTStorage<1, GrPipeline> fPipelineStorage; | 89 SkAlignedSTStorage<1, GrPipeline> fPipelineStorage; |
| 90 bool fPipelineInstalled; | 90 bool fPipelineInstalled; |
| 91 typedef GrBatch INHERITED; | 91 typedef GrBatch INHERITED; |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 #endif | 94 #endif |
| OLD | NEW |