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

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

Issue 10735010: 3D Compositing in <browser>, first draft. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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
« ipc/ipc_channel_proxy.cc ('K') | « ipc/ipc_channel_proxy.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_context_glx.h" 9 #include "ui/gl/gl_context_glx.h"
10 10
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 return false; 172 return false;
173 } 173 }
174 174
175 if (!surface->OnMakeCurrent(this)) { 175 if (!surface->OnMakeCurrent(this)) {
176 LOG(ERROR) << "Could not make current."; 176 LOG(ERROR) << "Could not make current.";
177 ReleaseCurrent(surface); 177 ReleaseCurrent(surface);
178 Destroy(); 178 Destroy();
179 return false; 179 return false;
180 } 180 }
181 181
182 DCHECK(IsCurrent(surface));
Fady Samuel 2012/07/06 15:14:44 Is this necessary? Presumably this was used for de
182 return true; 183 return true;
183 } 184 }
184 185
185 void GLContextGLX::ReleaseCurrent(GLSurface* surface) { 186 void GLContextGLX::ReleaseCurrent(GLSurface* surface) {
186 if (!IsCurrent(surface)) 187 if (!IsCurrent(surface))
187 return; 188 return;
188 189
189 SetCurrent(NULL, NULL); 190 SetCurrent(NULL, NULL);
190 if (!glXMakeCurrent(display_, 0, 0)) 191 if (!glXMakeCurrent(display_, 0, 0))
191 LOG(ERROR) << "glXMakeCurrent failed in ReleaseCurrent"; 192 LOG(ERROR) << "glXMakeCurrent failed in ReleaseCurrent";
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 247
247 bool GLContextGLX::WasAllocatedUsingARBRobustness() { 248 bool GLContextGLX::WasAllocatedUsingARBRobustness() {
248 return GLSurfaceGLX::IsCreateContextRobustnessSupported(); 249 return GLSurfaceGLX::IsCreateContextRobustnessSupported();
249 } 250 }
250 251
251 GLContextGLX::~GLContextGLX() { 252 GLContextGLX::~GLContextGLX() {
252 Destroy(); 253 Destroy();
253 } 254 }
254 255
255 } // namespace gfx 256 } // namespace gfx
OLDNEW
« ipc/ipc_channel_proxy.cc ('K') | « ipc/ipc_channel_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698