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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 bool installPipeline(const GrPipeline::CreateArgs&); | 72 bool installPipeline(const GrPipeline::CreateArgs&); |
73 | 73 |
74 // TODO no GrPrimitiveProcessors yet read fragment position | 74 // TODO no GrPrimitiveProcessors yet read fragment position |
75 bool willReadFragmentPosition() const { return false; } | 75 bool willReadFragmentPosition() const { return false; } |
76 | 76 |
77 uint32_t renderTargetUniqueID() const final { | 77 uint32_t renderTargetUniqueID() const final { |
78 SkASSERT(fPipelineInstalled); | 78 SkASSERT(fPipelineInstalled); |
79 return this->pipeline()->getRenderTarget()->uniqueID(); | 79 return this->pipeline()->getRenderTarget()->uniqueID(); |
80 } | 80 } |
81 | 81 |
82 GrRenderTarget* renderTarget() const final { | 82 GrRenderTargetProxy* rtp() const final { |
83 SkASSERT(fPipelineInstalled); | 83 SkASSERT(fPipelineInstalled); |
84 return this->pipeline()->getRenderTarget(); | 84 //return this->pipeline()->getRenderTarget(); |
| 85 return nullptr; |
85 } | 86 } |
86 | 87 |
87 SkString dumpInfo() const override { | 88 SkString dumpInfo() const override { |
88 SkString string; | 89 SkString string; |
89 string.appendf("RT: %d\n", this->renderTargetUniqueID()); | 90 string.appendf("RT: %d\n", this->renderTargetUniqueID()); |
90 string.append("ColorStages:\n"); | 91 string.append("ColorStages:\n"); |
91 for (int i = 0; i < this->pipeline()->numColorFragmentProcessors(); i++)
{ | 92 for (int i = 0; i < this->pipeline()->numColorFragmentProcessors(); i++)
{ |
92 string.appendf("\t\t%s\n\t\t%s\n", | 93 string.appendf("\t\t%s\n\t\t%s\n", |
93 this->pipeline()->getColorFragmentProcessor(i).name()
, | 94 this->pipeline()->getColorFragmentProcessor(i).name()
, |
94 this->pipeline()->getColorFragmentProcessor(i).dumpIn
fo().c_str()); | 95 this->pipeline()->getColorFragmentProcessor(i).dumpIn
fo().c_str()); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 }; | 140 }; |
140 SkTArray<QueuedUpload> fInlineUploads; | 141 SkTArray<QueuedUpload> fInlineUploads; |
141 | 142 |
142 private: | 143 private: |
143 SkAlignedSTStorage<1, GrPipeline> fPipelineStorage; | 144 SkAlignedSTStorage<1, GrPipeline> fPipelineStorage; |
144 bool fPipelineInstalled; | 145 bool fPipelineInstalled; |
145 typedef GrBatch INHERITED; | 146 typedef GrBatch INHERITED; |
146 }; | 147 }; |
147 | 148 |
148 #endif | 149 #endif |
OLD | NEW |