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

Unified 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, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gl/gl_surface_egl.cc ('k') | ui/gl/gl_surface_osmesa.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface_glx.cc
diff --git a/ui/gl/gl_surface_glx.cc b/ui/gl/gl_surface_glx.cc
index 5acfc7c9d214560663cc7ad1649ececbe9eb3e3d..5ae9350ffe465033c481f78ae2ef5cebe93fe079 100644
--- a/ui/gl/gl_surface_glx.cc
+++ b/ui/gl/gl_surface_glx.cc
@@ -582,6 +582,10 @@ PbufferGLSurfaceGLX::PbufferGLSurfaceGLX(const gfx::Size& size)
: size_(size),
config_(NULL),
pbuffer_(0) {
+ // Some implementations of Pbuffer do not support having a 0 size. For such
+ // cases use a (1, 1) surface.
+ if (size_.GetArea() == 0)
+ size_.SetSize(1, 1);
}
bool PbufferGLSurfaceGLX::Initialize() {
« 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