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

Unified Diff: ui/gl/gl_surface_egl.cc

Issue 309463003: Revert of Updating calls to offscreen buffers to use a size of (0,0) when they do not require (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « gpu/config/gpu_info_collector.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_egl.cc
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
index f978b23883cb13269f518e592699dab07aed2082..040f8087f92d6a985e19f75d6ea5993914f2ecc3 100644
--- a/ui/gl/gl_surface_egl.cc
+++ b/ui/gl/gl_surface_egl.cc
@@ -489,10 +489,6 @@
PbufferGLSurfaceEGL::PbufferGLSurfaceEGL(const gfx::Size& size)
: size_(size),
surface_(NULL) {
- // 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 PbufferGLSurfaceEGL::Initialize() {
@@ -501,6 +497,12 @@
EGLDisplay display = GetDisplay();
if (!display) {
LOG(ERROR) << "Trying to create surface with invalid display.";
+ return false;
+ }
+
+ if (size_.GetArea() == 0) {
+ LOG(ERROR) << "Error: surface has zero area "
+ << size_.width() << " x " << size_.height();
return false;
}
« no previous file with comments | « gpu/config/gpu_info_collector.cc ('k') | ui/gl/gl_surface_osmesa.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698