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

Unified Diff: ui/gl/gl_surface_osmesa.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_glx.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface_osmesa.cc
diff --git a/ui/gl/gl_surface_osmesa.cc b/ui/gl/gl_surface_osmesa.cc
index 8018fe83824dcc20ed7adf6ad93f8251b7914979..58d955be00298d4e37db00bcdb1f996dcb19d2bf 100644
--- a/ui/gl/gl_surface_osmesa.cc
+++ b/ui/gl/gl_surface_osmesa.cc
@@ -14,6 +14,10 @@ namespace gfx {
GLSurfaceOSMesa::GLSurfaceOSMesa(unsigned format, const gfx::Size& size)
: format_(format),
size_(size) {
+ // Implementations of OSMesa surface do not support having a 0 size. In such
+ // cases use a (1, 1) surface.
+ if (size_.GetArea() == 0)
+ size_.SetSize(1, 1);
}
bool GLSurfaceOSMesa::Initialize() {
« no previous file with comments | « ui/gl/gl_surface_glx.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698