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

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

Issue 1810323002: Cache render targets that render to wrapped textures Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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
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"
(...skipping 19 matching lines...) Expand all
30 if (this->isPurgeable()) { 30 if (this->isPurgeable()) {
31 traceMemoryDump->dumpNumericValue(dumpName.c_str(), "purgeable_size", 31 traceMemoryDump->dumpNumericValue(dumpName.c_str(), "purgeable_size",
32 "bytes", size); 32 "bytes", size);
33 } 33 }
34 34
35 SkString texture_id; 35 SkString texture_id;
36 texture_id.appendU32(this->textureID()); 36 texture_id.appendU32(this->textureID());
37 traceMemoryDump->setMemoryBacking(dumpName.c_str(), "gl_texture", 37 traceMemoryDump->setMemoryBacking(dumpName.c_str(), "gl_texture",
38 texture_id.c_str()); 38 texture_id.c_str());
39 } 39 }
40
41 bool GrGLTextureRenderTarget::refsWrappedResources() const {
42 // The GrGLRenderTarget part of this class will not reference external resou rces, because client
43 // provides either an external texture or an external fbo, never both. The e xternal texture
44 // produces GrGLTextureRenderTarget, the external fbo produces plain GrGLRen derTarget.o
45 return this->GrGLTexture::refsWrappedResources();
46 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698