summaryrefslogtreecommitdiffstats
path: root/ui/gl/gl_surface_egl.cc
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-19 19:47:23 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-19 19:47:23 +0000
commita60f94411c563240123d7d0220cfe7004633207f (patch)
tree93087551f9e182314800d889dacc3db6ec3645ef /ui/gl/gl_surface_egl.cc
parent64ab77dedb80e6aae72698684137cb0c23a623fe (diff)
downloadchromium_src-a60f94411c563240123d7d0220cfe7004633207f.zip
chromium_src-a60f94411c563240123d7d0220cfe7004633207f.tar.gz
chromium_src-a60f94411c563240123d7d0220cfe7004633207f.tar.bz2
PbufferGLSurfaceEGL fails early if size is zero.
Review URL: https://chromiumcodereview.appspot.com/10580008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143027 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gl/gl_surface_egl.cc')
-rw-r--r--ui/gl/gl_surface_egl.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
index b35806d..17ecce7 100644
--- a/ui/gl/gl_surface_egl.cc
+++ b/ui/gl/gl_surface_egl.cc
@@ -374,6 +374,12 @@ bool PbufferGLSurfaceEGL::Initialize() {
return false;
}
+ if (size_.GetArea() == 0) {
+ LOG(ERROR) << "Error: surface has zero area "
+ << size_.width() << " x " << size_.height();
+ return false;
+ }
+
const EGLint pbuffer_attribs[] = {
EGL_WIDTH, size_.width(),
EGL_HEIGHT, size_.height(),