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

Side by Side Diff: ui/gl/gl_surface_glx.cc

Issue 10822029: Use EXT_robustness where available on GLES2 platforms to detect and respond to resets of the graphi… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review feedback. Rebuilt and re-tested. Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gl/gl_surface_egl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 extern "C" { 5 extern "C" {
6 #include <X11/Xlib.h> 6 #include <X11/Xlib.h>
7 } 7 }
8 8
9 #include "ui/gl/gl_surface_glx.h" 9 #include "ui/gl/gl_surface_glx.h"
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 return true; 71 return true;
72 } 72 }
73 73
74 // static 74 // static
75 const char* GLSurfaceGLX::GetGLXExtensions() { 75 const char* GLSurfaceGLX::GetGLXExtensions() {
76 return g_glx_extensions; 76 return g_glx_extensions;
77 } 77 }
78 78
79 // static 79 // static
80 bool GLSurfaceGLX::HasGLXExtension(const char* name) { 80 bool GLSurfaceGLX::HasGLXExtension(const char* name) {
81 DCHECK(name); 81 return ExtensionsContain(GetGLXExtensions(), name);
82 const char* c_extensions = GetGLXExtensions();
83 if (!c_extensions)
84 return false;
85 std::string extensions(c_extensions);
86 extensions += " ";
87
88 std::string delimited_name(name);
89 delimited_name += " ";
90
91 return extensions.find(delimited_name) != std::string::npos;
92 } 82 }
93 83
94 // static 84 // static
95 bool GLSurfaceGLX::IsCreateContextRobustnessSupported() { 85 bool GLSurfaceGLX::IsCreateContextRobustnessSupported() {
96 return g_glx_create_context_robustness_supported; 86 return g_glx_create_context_robustness_supported;
97 } 87 }
98 88
99 void* GLSurfaceGLX::GetDisplay() { 89 void* GLSurfaceGLX::GetDisplay() {
100 return g_display; 90 return g_display;
101 } 91 }
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 308
319 void* PbufferGLSurfaceGLX::GetConfig() { 309 void* PbufferGLSurfaceGLX::GetConfig() {
320 return config_; 310 return config_;
321 } 311 }
322 312
323 PbufferGLSurfaceGLX::~PbufferGLSurfaceGLX() { 313 PbufferGLSurfaceGLX::~PbufferGLSurfaceGLX() {
324 Destroy(); 314 Destroy();
325 } 315 }
326 316
327 } // namespace gfx 317 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_surface_egl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698