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

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

Issue 6969002: Workaround for open source drivers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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 | « no previous file | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/gfx/gl/gl_surface_glx.h" 9 #include "ui/gfx/gl/gl_surface_glx.h"
10 10
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 &visual_template, 100 &visual_template,
101 &num_visual_infos)); 101 &num_visual_infos));
102 102
103 if (!num_visual_infos) 103 if (!num_visual_infos)
104 return false; 104 return false;
105 105
106 if (glXGetFBConfigFromVisualSGIX) { 106 if (glXGetFBConfigFromVisualSGIX) {
107 config_ = glXGetFBConfigFromVisualSGIX(g_display, visual_infos.get()); 107 config_ = glXGetFBConfigFromVisualSGIX(g_display, visual_infos.get());
108 if (!config_) { 108 if (!config_) {
109 LOG(ERROR) << "glXGetFBConfigFromVisualSGIX failed."; 109 LOG(ERROR) << "glXGetFBConfigFromVisualSGIX failed.";
110 return false;
111 } 110 }
112 } else { 111 }
112
113 if (!config_) {
113 int config_id; 114 int config_id;
114 if (glXGetConfig(g_display, 115 if (glXGetConfig(g_display,
115 visual_infos.get(), 116 visual_infos.get(),
116 GLX_FBCONFIG_ID, 117 GLX_FBCONFIG_ID,
117 &config_id)) { 118 &config_id)) {
118 LOG(ERROR) << "glXGetConfig failed."; 119 LOG(ERROR) << "glXGetConfig failed.";
119 return false; 120 return false;
120 } 121 }
121 122
122 const int config_attributes[] = { 123 const int config_attributes[] = {
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 272
272 void* PbufferGLSurfaceGLX::GetHandle() { 273 void* PbufferGLSurfaceGLX::GetHandle() {
273 return reinterpret_cast<void*>(pbuffer_); 274 return reinterpret_cast<void*>(pbuffer_);
274 } 275 }
275 276
276 void* PbufferGLSurfaceGLX::GetConfig() { 277 void* PbufferGLSurfaceGLX::GetConfig() {
277 return config_; 278 return config_;
278 } 279 }
279 280
280 } // namespace gfx 281 } // namespace gfx
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698