Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/gpu/batches/GrDrawBatch.h

Issue 2215323003: Start using RenderTargetProxy (omnibus) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/batches/GrDiscardBatch.h ('k') | src/gpu/batches/GrStencilPathBatch.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/gpu/batches/GrDiscardBatch.h ('k') | src/gpu/batches/GrStencilPathBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698