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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 bool installPipeline(const GrPipeline::CreateArgs&); | 54 bool installPipeline(const GrPipeline::CreateArgs&); |
55 | 55 |
56 // TODO no GrPrimitiveProcessors yet read fragment position | 56 // TODO no GrPrimitiveProcessors yet read fragment position |
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 GrRenderTarget* rt2() const override { |
| 65 SkASSERT(fPipelineInstalled); |
| 66 return this->pipeline()->getRenderTarget(); |
| 67 } |
| 68 |
64 SkString dumpInfo() const override { | 69 SkString dumpInfo() const override { |
65 SkString string; | 70 SkString string; |
66 string.append("ColorStages:\n"); | 71 string.append("ColorStages:\n"); |
67 for (int i = 0; i < this->pipeline()->numColorFragmentProcessors(); i++)
{ | 72 for (int i = 0; i < this->pipeline()->numColorFragmentProcessors(); i++)
{ |
68 string.appendf("\t\t%s\n", this->pipeline()->getColorFragmentProcess
or(i).name()); | 73 string.appendf("\t\t%s\n", this->pipeline()->getColorFragmentProcess
or(i).name()); |
69 } | 74 } |
70 string.append("CoverageStages:\n"); | 75 string.append("CoverageStages:\n"); |
71 for (int i = 0; i < this->pipeline()->numCoverageFragmentProcessors(); i
++) { | 76 for (int i = 0; i < this->pipeline()->numCoverageFragmentProcessors(); i
++) { |
72 string.appendf("\t%s\n", this->pipeline()->getCoverageFragmentProces
sor(i).name()); | 77 string.appendf("\t%s\n", this->pipeline()->getCoverageFragmentProces
sor(i).name()); |
73 } | 78 } |
(...skipping 11 matching lines...) Expand all Loading... |
85 protected: | 90 protected: |
86 SkTArray<SkAutoTUnref<GrBatchUploader>, true> fInlineUploads; | 91 SkTArray<SkAutoTUnref<GrBatchUploader>, true> fInlineUploads; |
87 | 92 |
88 private: | 93 private: |
89 SkAlignedSTStorage<1, GrPipeline> fPipelineStorage; | 94 SkAlignedSTStorage<1, GrPipeline> fPipelineStorage; |
90 bool fPipelineInstalled; | 95 bool fPipelineInstalled; |
91 typedef GrBatch INHERITED; | 96 typedef GrBatch INHERITED; |
92 }; | 97 }; |
93 | 98 |
94 #endif | 99 #endif |
OLD | NEW |