OLD | NEW |
---|---|
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 #include "ui/gl/gl_context_glx.h" | 5 #include "ui/gl/gl_context_glx.h" |
6 | 6 |
7 extern "C" { | 7 extern "C" { |
8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
9 } | 9 } |
10 #include <memory> | 10 #include <memory> |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
159 return display_; | 159 return display_; |
160 } | 160 } |
161 | 161 |
162 bool GLContextGLX::Initialize( | 162 bool GLContextGLX::Initialize( |
163 GLSurface* compatible_surface, GpuPreference gpu_preference) { | 163 GLSurface* compatible_surface, GpuPreference gpu_preference) { |
164 display_ = static_cast<XDisplay*>(compatible_surface->GetDisplay()); | 164 display_ = static_cast<XDisplay*>(compatible_surface->GetDisplay()); |
165 | 165 |
166 GLXContext share_handle = static_cast<GLXContext>( | 166 GLXContext share_handle = static_cast<GLXContext>( |
167 share_group() ? share_group()->GetHandle() : nullptr); | 167 share_group() ? share_group()->GetHandle() : nullptr); |
168 | 168 |
169 int fbconfigid = 0; | |
170 glXGetFBConfigAttrib( | |
171 display_, static_cast<GLXFBConfig>(compatible_surface->GetConfig()), | |
172 GLX_FBCONFIG_ID, &fbconfigid); | |
piman
2016/09/22 21:24:55
Is this used anywhere?
Tom (Use chromium acct)
2016/09/23 20:00:37
Removed. More leftover debugging..
| |
173 | |
169 if (GLSurfaceGLX::IsCreateContextSupported()) { | 174 if (GLSurfaceGLX::IsCreateContextSupported()) { |
170 DVLOG(1) << "GLX_ARB_create_context supported."; | 175 DVLOG(1) << "GLX_ARB_create_context supported."; |
171 context_ = CreateHighestVersionContext( | 176 context_ = CreateHighestVersionContext( |
172 display_, static_cast<GLXFBConfig>(compatible_surface->GetConfig()), | 177 display_, static_cast<GLXFBConfig>(compatible_surface->GetConfig()), |
173 share_handle); | 178 share_handle); |
174 if (!context_) { | 179 if (!context_) { |
175 LOG(ERROR) << "Failed to create GL context with " | 180 LOG(ERROR) << "Failed to create GL context with " |
176 << "glXCreateContextAttribsARB."; | 181 << "glXCreateContextAttribsARB."; |
177 return false; | 182 return false; |
178 } | 183 } |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
312 | 317 |
313 bool GLContextGLX::WasAllocatedUsingRobustnessExtension() { | 318 bool GLContextGLX::WasAllocatedUsingRobustnessExtension() { |
314 return GLSurfaceGLX::IsCreateContextRobustnessSupported(); | 319 return GLSurfaceGLX::IsCreateContextRobustnessSupported(); |
315 } | 320 } |
316 | 321 |
317 GLContextGLX::~GLContextGLX() { | 322 GLContextGLX::~GLContextGLX() { |
318 Destroy(); | 323 Destroy(); |
319 } | 324 } |
320 | 325 |
321 } // namespace gl | 326 } // namespace gl |
OLD | NEW |