| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 this->pipeline()->getColorFragmentProcessor(i).name()
, | 93 this->pipeline()->getColorFragmentProcessor(i).name()
, |
| 94 this->pipeline()->getColorFragmentProcessor(i).dumpIn
fo().c_str()); | 94 this->pipeline()->getColorFragmentProcessor(i).dumpIn
fo().c_str()); |
| 95 } | 95 } |
| 96 string.append("CoverageStages:\n"); | 96 string.append("CoverageStages:\n"); |
| 97 for (int i = 0; i < this->pipeline()->numCoverageFragmentProcessors(); i
++) { | 97 for (int i = 0; i < this->pipeline()->numCoverageFragmentProcessors(); i
++) { |
| 98 string.appendf("\t\t%s\n\t\t%s\n", | 98 string.appendf("\t\t%s\n\t\t%s\n", |
| 99 this->pipeline()->getCoverageFragmentProcessor(i).nam
e(), | 99 this->pipeline()->getCoverageFragmentProcessor(i).nam
e(), |
| 100 this->pipeline()->getCoverageFragmentProcessor(i).dum
pInfo().c_str()); | 100 this->pipeline()->getCoverageFragmentProcessor(i).dum
pInfo().c_str()); |
| 101 } | 101 } |
| 102 string.appendf("XP: %s\n", this->pipeline()->getXferProcessor().name()); | 102 string.appendf("XP: %s\n", this->pipeline()->getXferProcessor().name()); |
| 103 SkString scissor; |
| 104 if (this->pipeline()->getScissorState().enabled()) { |
| 105 scissor.printf("[L: %d, T: %d, R: %d, B: %d]", |
| 106 this->pipeline()->getScissorState().rect().fLeft, |
| 107 this->pipeline()->getScissorState().rect().fTop, |
| 108 this->pipeline()->getScissorState().rect().fRight, |
| 109 this->pipeline()->getScissorState().rect().fBottom); |
| 110 } else { |
| 111 scissor = "<disabled>"; |
| 112 } |
| 113 string.appendf("Scissor: %s\n", scissor.c_str()); |
| 114 string.appendf("Bounds: [L: %.2f, T: %.2f, R: %.2f, B: %.2f]\n", |
| 115 this->bounds().fLeft, |
| 116 this->bounds().fTop, |
| 117 this->bounds().fRight, |
| 118 this->bounds().fBottom); |
| 103 return string; | 119 return string; |
| 104 } | 120 } |
| 105 | 121 |
| 106 protected: | 122 protected: |
| 107 virtual void computePipelineOptimizations(GrInitInvariantOutput* color, | 123 virtual void computePipelineOptimizations(GrInitInvariantOutput* color, |
| 108 GrInitInvariantOutput* coverage, | 124 GrInitInvariantOutput* coverage, |
| 109 GrBatchToXPOverrides* overrides) c
onst = 0; | 125 GrBatchToXPOverrides* overrides) c
onst = 0; |
| 110 | 126 |
| 111 private: | 127 private: |
| 112 /** | 128 /** |
| (...skipping 12 matching lines...) Expand all Loading... |
| 125 }; | 141 }; |
| 126 SkTArray<QueuedUpload> fInlineUploads; | 142 SkTArray<QueuedUpload> fInlineUploads; |
| 127 | 143 |
| 128 private: | 144 private: |
| 129 SkAlignedSTStorage<1, GrPipeline> fPipelineStorage; | 145 SkAlignedSTStorage<1, GrPipeline> fPipelineStorage; |
| 130 bool fPipelineInstalled; | 146 bool fPipelineInstalled; |
| 131 typedef GrBatch INHERITED; | 147 typedef GrBatch INHERITED; |
| 132 }; | 148 }; |
| 133 | 149 |
| 134 #endif | 150 #endif |
| OLD | NEW |