diff options
author | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-22 00:37:18 +0000 |
---|---|---|
committer | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-22 00:37:18 +0000 |
commit | 0e8cac7f9ce4db3ba6c78f077d7db2861cab56a1 (patch) | |
tree | 51bdef07482c072e887811088ea600be48c1c296 /ui | |
parent | f9942c2b895b8abcc8aec8a70074732b8be29651 (diff) | |
download | chromium_src-0e8cac7f9ce4db3ba6c78f077d7db2861cab56a1.zip chromium_src-0e8cac7f9ce4db3ba6c78f077d7db2861cab56a1.tar.gz chromium_src-0e8cac7f9ce4db3ba6c78f077d7db2861cab56a1.tar.bz2 |
Blacklist GLX indirect rendering
Several part to this CL:
1- Implement gathering the direct rendering information. It needs a context, so
it is done through the CollectGraphicsInfoGL hook
2- Implement logic to hook the information to the blacklist
3- In some cases, indirect rendering causes creating surfaces/contexts, needed
to collect the info, to fail. So expose the failure mode (fatal vs non-fatal) to
the caller so that we can fully fail GPU things in that case.
BUG=72373,339244
Review URL: https://codereview.chromium.org/194303002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258721 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gl/gl_glx_api_implementation.cc | 1 | ||||
-rw-r--r-- | ui/gl/gl_implementation.cc | 3 | ||||
-rw-r--r-- | ui/gl/gl_implementation.h | 4 |
3 files changed, 7 insertions, 1 deletions
diff --git a/ui/gl/gl_glx_api_implementation.cc b/ui/gl/gl_glx_api_implementation.cc index 444a1b2..0392c39 100644 --- a/ui/gl/gl_glx_api_implementation.cc +++ b/ui/gl/gl_glx_api_implementation.cc @@ -81,6 +81,7 @@ bool GetGLWindowSystemBindingInfoGLX(GLWindowSystemBindingInfo* info) { info->version = version; if (extensions) info->extensions = extensions; + info->direct_rendering = !!glXIsDirect(display, glXGetCurrentContext()); return true; } diff --git a/ui/gl/gl_implementation.cc b/ui/gl/gl_implementation.cc index a7db8b0..9d6b34e 100644 --- a/ui/gl/gl_implementation.cc +++ b/ui/gl/gl_implementation.cc @@ -161,4 +161,7 @@ DisableNullDrawGLBindings::~DisableNullDrawGLBindings() { SetNullDrawGLBindingsEnabledGL(initial_enabled_); } +GLWindowSystemBindingInfo::GLWindowSystemBindingInfo() + : direct_rendering(true) {} + } // namespace gfx diff --git a/ui/gl/gl_implementation.h b/ui/gl/gl_implementation.h index 6f4eaf7..7319b47 100644 --- a/ui/gl/gl_implementation.h +++ b/ui/gl/gl_implementation.h @@ -27,10 +27,12 @@ enum GLImplementation { kGLImplementationMockGL }; -struct GLWindowSystemBindingInfo { +struct GL_EXPORT GLWindowSystemBindingInfo { + GLWindowSystemBindingInfo(); std::string vendor; std::string version; std::string extensions; + bool direct_rendering; }; void GetAllowedGLImplementations(std::vector<GLImplementation>* impls); |