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

Side by Side Diff: src/gpu/gl/GrGLTextureRenderTarget.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/GrGLRenderTarget.cpp ('k') | src/gpu/gl/GrGLVertexArray.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 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 #include "GrGLTextureRenderTarget.h" 8 #include "GrGLTextureRenderTarget.h"
9 9
10 #include "SkTraceMemoryDump.h" 10 #include "SkTraceMemoryDump.h"
11 11
12 // GrGLTextureRenderTarget must dump both of its superclasses. 12 // GrGLTextureRenderTarget must dump both of its superclasses.
13 void GrGLTextureRenderTarget::dumpMemoryStatistics( 13 void GrGLTextureRenderTarget::dumpMemoryStatistics(
14 SkTraceMemoryDump* traceMemoryDump) const { 14 SkTraceMemoryDump* traceMemoryDump) const {
15 GrGLRenderTarget::dumpMemoryStatistics(traceMemoryDump); 15 GrGLRenderTarget::dumpMemoryStatistics(traceMemoryDump);
16 16
17 // Also dump the GrGLTexture's memory. Due to this resource having both a 17 // Also dump the GrGLTexture's memory. Due to this resource having both a
18 // texture and a 18 // texture and a
19 // renderbuffer component, dump as skia/gpu_resources/resource_#/texture 19 // renderbuffer component, dump as skia/gpu_resources/resource_#/texture
20 SkString dumpName("skia/gpu_resources/resource_"); 20 SkString dumpName("skia/gpu_resources/resource_");
21 dumpName.appendS32(this->getUniqueID()); 21 dumpName.appendS32(this->uniqueID());
22 dumpName.append("/texture"); 22 dumpName.append("/texture");
23 23
24 // Use the texture's gpuMemorySize, not our own, which includes the 24 // Use the texture's gpuMemorySize, not our own, which includes the
25 // renderbuffer as well. 25 // renderbuffer as well.
26 size_t size = GrGLTexture::gpuMemorySize(); 26 size_t size = GrGLTexture::gpuMemorySize();
27 27
28 traceMemoryDump->dumpNumericValue(dumpName.c_str(), "size", "bytes", size); 28 traceMemoryDump->dumpNumericValue(dumpName.c_str(), "size", "bytes", size);
29 29
30 if (this->isPurgeable()) { 30 if (this->isPurgeable()) {
31 traceMemoryDump->dumpNumericValue(dumpName.c_str(), "purgeable_size", 31 traceMemoryDump->dumpNumericValue(dumpName.c_str(), "purgeable_size",
(...skipping 11 matching lines...) Expand all
43 // wrapped FBO. 43 // wrapped FBO.
44 return true; 44 return true;
45 } 45 }
46 46
47 GrGLTextureRenderTarget* GrGLTextureRenderTarget::CreateWrapped(GrGLGpu* gpu, 47 GrGLTextureRenderTarget* GrGLTextureRenderTarget::CreateWrapped(GrGLGpu* gpu,
48 const GrSurfaceD esc& desc, 48 const GrSurfaceD esc& desc,
49 const GrGLTextur e::IDDesc& texIDDesc, 49 const GrGLTextur e::IDDesc& texIDDesc,
50 const GrGLRender Target::IDDesc& rtIDDesc) { 50 const GrGLRender Target::IDDesc& rtIDDesc) {
51 return new GrGLTextureRenderTarget(gpu, desc, texIDDesc, rtIDDesc); 51 return new GrGLTextureRenderTarget(gpu, desc, texIDDesc, rtIDDesc);
52 } 52 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLRenderTarget.cpp ('k') | src/gpu/gl/GrGLVertexArray.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698