Skip to content

Commit

Permalink
Initialize the EGL surface to the window size on Win
Browse files Browse the repository at this point in the history
On other platforms, the EGL surface's starting size is that of the window, so that should be done on Windows as well.

BUG=358870

Review URL: https://codereview.chromium.org/224493002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261592 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
jbauman@chromium.org committed Apr 4, 2014
1 parent 43ee821 commit 46ad67f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ui/gl/gl_surface_egl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "build/build_config.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gl/egl_util.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_implementation.h"
Expand Down Expand Up @@ -320,6 +321,12 @@ NativeViewGLSurfaceEGL::NativeViewGLSurfaceEGL(EGLNativeWindowType window)
if (window)
ANativeWindow_acquire(window);
#endif

#if defined(OS_WIN)
RECT windowRect;
if (GetClientRect(window_, &windowRect))
size_ = gfx::Rect(windowRect).size();
#endif
}

bool NativeViewGLSurfaceEGL::Initialize() {
Expand Down

0 comments on commit 46ad67f

Please sign in to comment.