Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / ui / gl / gl_surface_egl.cc
index e8e301a..83f328e 100644 (file)
@@ -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"
@@ -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() {