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

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

Issue 7021014: GLContext no longer holds a pointer to a GLSurface. (Closed) Base URL: svn://chrome-svn/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
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 #include <X11/Xatom.h> 7 #include <X11/Xatom.h>
8 } 8 }
9 9
10 #include <map> 10 #include <map>
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 Destroy(); 263 Destroy();
264 } 264 }
265 265
266 bool PbufferGLSurfaceGLX::Initialize() { 266 bool PbufferGLSurfaceGLX::Initialize() {
267 DCHECK(!pbuffer_); 267 DCHECK(!pbuffer_);
268 268
269 static const int config_attributes[] = { 269 static const int config_attributes[] = {
270 GLX_BUFFER_SIZE, 32, 270 GLX_BUFFER_SIZE, 32,
271 GLX_ALPHA_SIZE, 8, 271 GLX_ALPHA_SIZE, 8,
272 GLX_BLUE_SIZE, 8, 272 GLX_BLUE_SIZE, 8,
273 GLX_GREEN_SIZE, 8,
273 GLX_RED_SIZE, 8, 274 GLX_RED_SIZE, 8,
274 GLX_DEPTH_SIZE, 16, // TODO(apatrick): support optional depth buffer 275 GLX_DEPTH_SIZE, 16, // TODO(apatrick): support optional depth buffer
275 GLX_STENCIL_SIZE, 8, 276 GLX_STENCIL_SIZE, 8,
276 GLX_RENDER_TYPE, GLX_RGBA_BIT, 277 GLX_RENDER_TYPE, GLX_RGBA_BIT,
277 GLX_DRAWABLE_TYPE, GLX_PBUFFER_BIT, 278 GLX_DRAWABLE_TYPE, GLX_PBUFFER_BIT,
278 GLX_DOUBLEBUFFER, False, 279 GLX_DOUBLEBUFFER, False,
279 0 280 0
280 }; 281 };
281 282
282 int num_elements = 0; 283 int num_elements = 0;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 338
338 void* PbufferGLSurfaceGLX::GetHandle() { 339 void* PbufferGLSurfaceGLX::GetHandle() {
339 return reinterpret_cast<void*>(pbuffer_); 340 return reinterpret_cast<void*>(pbuffer_);
340 } 341 }
341 342
342 void* PbufferGLSurfaceGLX::GetConfig() { 343 void* PbufferGLSurfaceGLX::GetConfig() {
343 return config_; 344 return config_;
344 } 345 }
345 346
346 } // namespace gfx 347 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698