| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 bool willReadFragmentPosition() const { return false; } | 57 bool willReadFragmentPosition() const { return false; } |
| 58 | 58 |
| 59 uint32_t renderTargetUniqueID() const final { | 59 uint32_t renderTargetUniqueID() const final { |
| 60 SkASSERT(fPipelineInstalled); | 60 SkASSERT(fPipelineInstalled); |
| 61 return this->pipeline()->getRenderTarget()->getUniqueID(); | 61 return this->pipeline()->getRenderTarget()->getUniqueID(); |
| 62 } | 62 } |
| 63 | 63 |
| 64 SkString dumpInfo() const override { | 64 SkString dumpInfo() const override { |
| 65 SkString string; | 65 SkString string; |
| 66 string.append("ColorStages:\n"); | 66 string.append("ColorStages:\n"); |
| 67 for (int i = 0; i < this->pipeline()->numColorFragmentProcessors(); i++)
{ | 67 for (int i = 0; i < this->pipeline()->numColorFragmentStages(); i++) { |
| 68 string.appendf("\t\t%s\n", this->pipeline()->getColorFragmentProcess
or(i).name()); | 68 string.appendf("\t\t%s\n", this->pipeline()->getColorStage(i).proces
sor()->name()); |
| 69 } | 69 } |
| 70 string.append("CoverageStages:\n"); | 70 string.append("CoverageStages:\n"); |
| 71 for (int i = 0; i < this->pipeline()->numCoverageFragmentProcessors(); i
++) { | 71 for (int i = 0; i < this->pipeline()->numCoverageFragmentStages(); i++)
{ |
| 72 string.appendf("\t%s\n", this->pipeline()->getCoverageFragmentProces
sor(i).name()); | 72 string.appendf("\t%s\n", this->pipeline()->getCoverageStage(i).proce
ssor()->name()); |
| 73 } | 73 } |
| 74 string.appendf("XP: %s\n", this->pipeline()->getXferProcessor()->name())
; | 74 string.appendf("XP: %s\n", this->pipeline()->getXferProcessor()->name())
; |
| 75 return string; | 75 return string; |
| 76 } | 76 } |
| 77 | 77 |
| 78 private: | 78 private: |
| 79 /** | 79 /** |
| 80 * initBatchTracker is a hook for the some additional overrides / optimizati
on possibilities | 80 * initBatchTracker is a hook for the some additional overrides / optimizati
on possibilities |
| 81 * from the GrXferProcessor. | 81 * from the GrXferProcessor. |
| 82 */ | 82 */ |
| 83 virtual void initBatchTracker(const GrPipelineOptimizations&) = 0; | 83 virtual void initBatchTracker(const GrPipelineOptimizations&) = 0; |
| 84 | 84 |
| 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 |