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

Side by Side Diff: src/gpu/gl/GrGLRenderTarget.cpp

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/gl/GrGLGpu.cpp ('k') | src/gpu/gl/GrGLTextureRenderTarget.cpp » ('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 2011 Google Inc. 2 * Copyright 2011 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 #include "GrGLRenderTarget.h" 8 #include "GrGLRenderTarget.h"
9 9
10 #include "GrGLGpu.h" 10 #include "GrGLGpu.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 // texture object. 183 // texture object.
184 184
185 // Log any renderbuffer's contribution to memory. We only do this if we own the renderbuffer 185 // Log any renderbuffer's contribution to memory. We only do this if we own the renderbuffer
186 // (have a fMSColorRenderbufferID). 186 // (have a fMSColorRenderbufferID).
187 if (fMSColorRenderbufferID) { 187 if (fMSColorRenderbufferID) {
188 size_t size = this->msaaSamples() * this->totalBytesPerSample(); 188 size_t size = this->msaaSamples() * this->totalBytesPerSample();
189 189
190 // Due to this resource having both a texture and a renderbuffer compone nt, dump as 190 // Due to this resource having both a texture and a renderbuffer compone nt, dump as
191 // skia/gpu_resources/resource_#/renderbuffer 191 // skia/gpu_resources/resource_#/renderbuffer
192 SkString dumpName("skia/gpu_resources/resource_"); 192 SkString dumpName("skia/gpu_resources/resource_");
193 dumpName.appendS32(this->getUniqueID()); 193 dumpName.appendS32(this->uniqueID());
194 dumpName.append("/renderbuffer"); 194 dumpName.append("/renderbuffer");
195 195
196 traceMemoryDump->dumpNumericValue(dumpName.c_str(), "size", "bytes", siz e); 196 traceMemoryDump->dumpNumericValue(dumpName.c_str(), "size", "bytes", siz e);
197 197
198 if (this->isPurgeable()) { 198 if (this->isPurgeable()) {
199 traceMemoryDump->dumpNumericValue(dumpName.c_str(), "purgeable_size" , "bytes", size); 199 traceMemoryDump->dumpNumericValue(dumpName.c_str(), "purgeable_size" , "bytes", size);
200 } 200 }
201 201
202 SkString renderbuffer_id; 202 SkString renderbuffer_id;
203 renderbuffer_id.appendU32(fMSColorRenderbufferID); 203 renderbuffer_id.appendU32(fMSColorRenderbufferID);
(...skipping 26 matching lines...) Expand all
230 int GrGLRenderTarget::totalSamples() const { 230 int GrGLRenderTarget::totalSamples() const {
231 int total_samples = this->msaaSamples(); 231 int total_samples = this->msaaSamples();
232 232
233 if (fTexFBOID != kUnresolvableFBOID) { 233 if (fTexFBOID != kUnresolvableFBOID) {
234 // If we own the resolve buffer then that is one more sample per pixel. 234 // If we own the resolve buffer then that is one more sample per pixel.
235 total_samples += 1; 235 total_samples += 1;
236 } 236 }
237 237
238 return total_samples; 238 return total_samples;
239 } 239 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLGpu.cpp ('k') | src/gpu/gl/GrGLTextureRenderTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698