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

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

Issue 2301523003: Have GrSurfaceProxys and GrGpuResources draw from the same pool of unique ids (Closed)
Patch Set: update to ToT Created 4 years, 3 months 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 return reinterpret_cast<const GrPipeline*>(fPipelineStorage.get()); 69 return reinterpret_cast<const GrPipeline*>(fPipelineStorage.get());
70 } 70 }
71 71
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()->getUniqueID(); 79 return this->pipeline()->getRenderTarget()->uniqueID();
80 } 80 }
81 81
82 GrRenderTarget* renderTarget() const final { 82 GrRenderTarget* renderTarget() const final {
83 SkASSERT(fPipelineInstalled); 83 SkASSERT(fPipelineInstalled);
84 return this->pipeline()->getRenderTarget(); 84 return this->pipeline()->getRenderTarget();
85 } 85 }
86 86
87 SkString dumpInfo() const override { 87 SkString dumpInfo() const override {
88 SkString string; 88 SkString string;
89 string.appendf("RT: %d\n", this->renderTargetUniqueID()); 89 string.appendf("RT: %d\n", this->renderTargetUniqueID());
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 }; 139 };
140 SkTArray<QueuedUpload> fInlineUploads; 140 SkTArray<QueuedUpload> fInlineUploads;
141 141
142 private: 142 private:
143 SkAlignedSTStorage<1, GrPipeline> fPipelineStorage; 143 SkAlignedSTStorage<1, GrPipeline> fPipelineStorage;
144 bool fPipelineInstalled; 144 bool fPipelineInstalled;
145 typedef GrBatch INHERITED; 145 typedef GrBatch INHERITED;
146 }; 146 };
147 147
148 #endif 148 #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