summaryrefslogtreecommitdiffstats
path: root/content/renderer/render_widget_fullscreen_pepper.h
diff options
context:
space:
mode:
authorkbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-13 22:05:49 +0000
committerkbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-13 22:05:49 +0000
commit8d2c15745a7118ae3dab7e20e046257a66fc46a5 (patch)
treeacb13a4cd9b0babf055e35d790ad52f07f55da9c /content/renderer/render_widget_fullscreen_pepper.h
parent18d0fb7f67bac43dfc16efd369b4e2999eaa2912 (diff)
downloadchromium_src-8d2c15745a7118ae3dab7e20e046257a66fc46a5.zip
chromium_src-8d2c15745a7118ae3dab7e20e046257a66fc46a5.tar.gz
chromium_src-8d2c15745a7118ae3dab7e20e046257a66fc46a5.tar.bz2
Detect and expose loss of OpenGL context using GL_ARB_robustness.
This initial patch changes the Linux port to use GLX_ARB_create_context_robustness when available, and tests periodically whether the context has been lost after each draw call and when making the context current. The detection of context loss also works with EGL and ANGLE, although it always reports an unknown reset status. WebKit changes will follow which test the reset status and determine what to do in response; for example, the policy might be to never restore a WebGL context which was lost (due to a GPU reset) and which was determined to be the guilty context. Tested manually with WebGL stress tests and verified on Linux and Windows that in at least some situations it is possible to detect guilty contexts and shut down the associated WebGL application. Some precision of this detection was recently lost and will need to be fixed in following CLs. Also updated and ran GPU unit tests. BUG=88106 TEST=none (tested manually; try servers) Review URL: http://codereview.chromium.org/7331020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92429 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/render_widget_fullscreen_pepper.h')
-rw-r--r--content/renderer/render_widget_fullscreen_pepper.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/content/renderer/render_widget_fullscreen_pepper.h b/content/renderer/render_widget_fullscreen_pepper.h
index d22b418..1664034 100644
--- a/content/renderer/render_widget_fullscreen_pepper.h
+++ b/content/renderer/render_widget_fullscreen_pepper.h
@@ -6,6 +6,7 @@
#define CONTENT_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_
#include "content/renderer/render_widget_fullscreen.h"
+#include "content/renderer/gpu/renderer_gl_context.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebWidget.h"
#include "webkit/plugins/ppapi/fullscreen_container.h"
@@ -17,8 +18,6 @@ class PluginInstance;
} // namespace ppapi
} // namespace webkit
-class RendererGLContext;
-
// A RenderWidget that hosts a fullscreen pepper plugin. This provides a
// FullscreenContainer that the plugin instance can callback into to e.g.
// invalidate rects.
@@ -77,7 +76,7 @@ class RenderWidgetFullscreenPepper : public RenderWidgetFullscreen,
bool CheckCompositing();
// Called when the compositing context gets lost.
- void OnLostContext();
+ void OnLostContext(RendererGLContext::ContextLostReason);
// Binding of RendererGLContext swapbuffers callback to
// RenderWidget::OnSwapBuffersCompleted.