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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: src/gpu/gl/GrGLTextureRenderTarget.cpp
diff --git a/src/gpu/gl/GrGLTextureRenderTarget.cpp b/src/gpu/gl/GrGLTextureRenderTarget.cpp
index b6068a4e56efc5b250872df3ed7931251357d034..fe4f9fced536a67d948b2b5305371122b0f39472 100644
--- a/src/gpu/gl/GrGLTextureRenderTarget.cpp
+++ b/src/gpu/gl/GrGLTextureRenderTarget.cpp
@@ -37,3 +37,10 @@ void GrGLTextureRenderTarget::dumpMemoryStatistics(
traceMemoryDump->setMemoryBacking(dumpName.c_str(), "gl_texture",
texture_id.c_str());
}
+
+bool GrGLTextureRenderTarget::refsWrappedResources() const {
+ // The GrGLRenderTarget part of this class will not reference external resources, because client
+ // provides either an external texture or an external fbo, never both. The external texture
+ // produces GrGLTextureRenderTarget, the external fbo produces plain GrGLRenderTarget.o
+ return this->GrGLTexture::refsWrappedResources();
+}

Powered by Google App Engine
This is Rietveld 408576698