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

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: Use ASSERT instead of 'if' in prepareMailbox() Created 6 years, 5 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 a52eb64d68173acf513ef3209fef55b7db695da7..2017d0cf678be9a6c5bc83c92fb651aa53b8ad2b 100644
--- a/Source/core/html/canvas/WebGLRenderingContextBase.cpp
+++ b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
@@ -831,6 +831,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