summaryrefslogtreecommitdiffstats
path: root/app/gfx
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-07 20:45:01 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-07 20:45:01 +0000
commit4bce24e4288130d9436863d1db3ee0295ed93277 (patch)
tree41b08178a03d6233ada409e877c5160ebabc189c /app/gfx
parent1fc82d9171749533e7028a21c1649697499f6056 (diff)
downloadchromium_src-4bce24e4288130d9436863d1db3ee0295ed93277.zip
chromium_src-4bce24e4288130d9436863d1db3ee0295ed93277.tar.gz
chromium_src-4bce24e4288130d9436863d1db3ee0295ed93277.tar.bz2
Added GPU stat for whether a GPU can report context lost.
On Windows it checks to see if the IDirect3D9 object supports Vista and later features (meaning it won't routinely report lost contexts). On Linux and Mac we can just check if its EGL versus some other GL that doesn't report lost contexts. I routed the stats to the renderer process so webkit code can query whether lost contexts are likely. I didn't wire up breakpad yet. TEST=try BUG=52318 Review URL: http://codereview.chromium.org/3149016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58755 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/gfx')
-rw-r--r--app/gfx/gl/gl_context_egl.cc4
-rw-r--r--app/gfx/gl/gl_context_egl.h5
2 files changed, 8 insertions, 1 deletions
diff --git a/app/gfx/gl/gl_context_egl.cc b/app/gfx/gl/gl_context_egl.cc
index 7cfde87..1156635 100644
--- a/app/gfx/gl/gl_context_egl.cc
+++ b/app/gfx/gl/gl_context_egl.cc
@@ -85,6 +85,10 @@ bool BaseEGLContext::InitializeOneOff() {
return true;
}
+EGLDisplay BaseEGLContext::GetDisplay() {
+ return g_display;
+}
+
NativeViewEGLContext::NativeViewEGLContext(void* window)
: window_(window),
surface_(NULL),
diff --git a/app/gfx/gl/gl_context_egl.h b/app/gfx/gl/gl_context_egl.h
index 3f1884b..9c59825 100644
--- a/app/gfx/gl/gl_context_egl.h
+++ b/app/gfx/gl/gl_context_egl.h
@@ -9,7 +9,8 @@
#include "gfx/size.h"
#include "app/gfx/gl/gl_context.h"
-typedef void *EGLContext;
+typedef void* EGLDisplay;
+typedef void* EGLContext;
typedef void* EGLSurface;
namespace gfx {
@@ -26,6 +27,8 @@ class BaseEGLContext : public GLContext {
static bool InitializeOneOff();
+ static EGLDisplay GetDisplay();
+
private:
DISALLOW_COPY_AND_ASSIGN(BaseEGLContext);
};