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

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

Issue 293293002: Updating calls to offscreen buffers to use a size of (0,0) when they do not require an actual buffer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 6 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') | ui/gl/gl_surface_osmesa.cc » ('j') | 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 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 } 575 }
576 576
577 NativeViewGLSurfaceGLX::~NativeViewGLSurfaceGLX() { 577 NativeViewGLSurfaceGLX::~NativeViewGLSurfaceGLX() {
578 Destroy(); 578 Destroy();
579 } 579 }
580 580
581 PbufferGLSurfaceGLX::PbufferGLSurfaceGLX(const gfx::Size& size) 581 PbufferGLSurfaceGLX::PbufferGLSurfaceGLX(const gfx::Size& size)
582 : size_(size), 582 : size_(size),
583 config_(NULL), 583 config_(NULL),
584 pbuffer_(0) { 584 pbuffer_(0) {
585 // Some implementations of Pbuffer do not support having a 0 size. For such
586 // cases use a (1, 1) surface.
587 if (size_.GetArea() == 0)
588 size_.SetSize(1, 1);
585 } 589 }
586 590
587 bool PbufferGLSurfaceGLX::Initialize() { 591 bool PbufferGLSurfaceGLX::Initialize() {
588 DCHECK(!pbuffer_); 592 DCHECK(!pbuffer_);
589 593
590 static const int config_attributes[] = { 594 static const int config_attributes[] = {
591 GLX_BUFFER_SIZE, 32, 595 GLX_BUFFER_SIZE, 32,
592 GLX_ALPHA_SIZE, 8, 596 GLX_ALPHA_SIZE, 8,
593 GLX_BLUE_SIZE, 8, 597 GLX_BLUE_SIZE, 8,
594 GLX_GREEN_SIZE, 8, 598 GLX_GREEN_SIZE, 8,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 665
662 void* PbufferGLSurfaceGLX::GetConfig() { 666 void* PbufferGLSurfaceGLX::GetConfig() {
663 return config_; 667 return config_;
664 } 668 }
665 669
666 PbufferGLSurfaceGLX::~PbufferGLSurfaceGLX() { 670 PbufferGLSurfaceGLX::~PbufferGLSurfaceGLX() {
667 Destroy(); 671 Destroy();
668 } 672 }
669 673
670 } // namespace gfx 674 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_surface_egl.cc ('k') | ui/gl/gl_surface_osmesa.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698