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

Unified Diff: Source/core/html/canvas/WebGLRenderingContextBase.cpp

Issue 251023004: WebGL: Free temporary GPU resources held by inactive or hidden WebGL. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase to ToT Created 6 years, 8 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: Source/core/html/canvas/WebGLRenderingContextBase.cpp
diff --git a/Source/core/html/canvas/WebGLRenderingContextBase.cpp b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
index f6e130a8b0e8d6ea8f1459cfb7b965b6bfde7bb2..09b480a1855116145b27f9883986745654f729ba 100644
--- a/Source/core/html/canvas/WebGLRenderingContextBase.cpp
+++ b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
@@ -822,6 +822,12 @@ void WebGLRenderingContextBase::markLayerComposited()
m_drawingBuffer->markLayerComposited();
}
+void WebGLRenderingContextBase::setIsHidden(bool hidden)
+{
+ if (!isContextLost())
+ m_drawingBuffer->setIsHidden(hidden);
+}
+
void WebGLRenderingContextBase::paintRenderingResultsToCanvas()
{
if (isContextLost()) {

Powered by Google App Engine
This is Rietveld 408576698