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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h

Issue 1756633002: Defer WebGL lost context restore until visible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
index 0fbc8c360955d458ad9ad99e5f63fc1348a52c72..0421b2aa8a9c2f550146b8f049e967d1e8f7a3c4 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
@@ -368,7 +368,8 @@ public:
// Restore when resources are available.
WhenAvailable,
- // Restore as soon as possible.
+ // Restore as soon as possible, but only when
+ // the canvas is visible.
Auto
};
void loseContext(LostContextMode) override;
@@ -493,6 +494,7 @@ protected:
RefPtr<WebGLContextGroup> m_contextGroup;
+ bool m_isHidden;
LostContextMode m_contextLostMode;
AutoRecoveryMethod m_autoRecoveryMethod;
// Dispatches a context lost event once it is determined that one is needed.
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698