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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 bool installPipeline(const GrPipeline::CreateArgs&); | 56 bool installPipeline(const GrPipeline::CreateArgs&); |
57 | 57 |
58 // TODO no GrPrimitiveProcessors yet read fragment position | 58 // TODO no GrPrimitiveProcessors yet read fragment position |
59 bool willReadFragmentPosition() const { return false; } | 59 bool willReadFragmentPosition() const { return false; } |
60 | 60 |
61 uint32_t renderTargetUniqueID() const final { | 61 uint32_t renderTargetUniqueID() const final { |
62 SkASSERT(fPipelineInstalled); | 62 SkASSERT(fPipelineInstalled); |
63 return this->pipeline()->getRenderTarget()->getUniqueID(); | 63 return this->pipeline()->getRenderTarget()->getUniqueID(); |
64 } | 64 } |
65 | 65 |
66 GrRenderTarget* renderTarget() const final { | |
67 SkASSERT(fPipelineInstalled); | |
68 return this->pipeline()->getRenderTarget(); | |
69 } | |
70 | |
71 SkString dumpInfo() const override { | 66 SkString dumpInfo() const override { |
72 SkString string; | 67 SkString string; |
73 string.appendf("RT: %d\n", this->renderTargetUniqueID()); | 68 string.appendf("RT: %d\n", this->renderTargetUniqueID()); |
74 string.append("ColorStages:\n"); | 69 string.append("ColorStages:\n"); |
75 for (int i = 0; i < this->pipeline()->numColorFragmentProcessors(); i++)
{ | 70 for (int i = 0; i < this->pipeline()->numColorFragmentProcessors(); i++)
{ |
76 string.appendf("\t\t%s\n\t\t%s\n", | 71 string.appendf("\t\t%s\n\t\t%s\n", |
77 this->pipeline()->getColorFragmentProcessor(i).name()
, | 72 this->pipeline()->getColorFragmentProcessor(i).name()
, |
78 this->pipeline()->getColorFragmentProcessor(i).dumpIn
fo().c_str()); | 73 this->pipeline()->getColorFragmentProcessor(i).dumpIn
fo().c_str()); |
79 } | 74 } |
80 string.append("CoverageStages:\n"); | 75 string.append("CoverageStages:\n"); |
(...skipping 21 matching lines...) Expand all Loading... |
102 protected: | 97 protected: |
103 SkTArray<SkAutoTUnref<GrBatchUploader>, true> fInlineUploads; | 98 SkTArray<SkAutoTUnref<GrBatchUploader>, true> fInlineUploads; |
104 | 99 |
105 private: | 100 private: |
106 SkAlignedSTStorage<1, GrPipeline> fPipelineStorage; | 101 SkAlignedSTStorage<1, GrPipeline> fPipelineStorage; |
107 bool fPipelineInstalled; | 102 bool fPipelineInstalled; |
108 typedef GrBatch INHERITED; | 103 typedef GrBatch INHERITED; |
109 }; | 104 }; |
110 | 105 |
111 #endif | 106 #endif |
OLD | NEW |