Index: app/gfx/gl/gl_context_win.cc |
=================================================================== |
--- app/gfx/gl/gl_context_win.cc (revision 66779) |
+++ app/gfx/gl/gl_context_win.cc (working copy) |
@@ -50,6 +50,7 @@ |
virtual bool IsCurrent(); |
virtual bool IsOffscreen(); |
virtual bool SwapBuffers(); |
+ virtual void SetSize(gfx::Size); |
virtual gfx::Size GetSize(); |
virtual void* GetHandle(); |
virtual void SetSwapInterval(int interval); |
@@ -82,6 +83,7 @@ |
virtual bool IsCurrent(); |
virtual bool IsOffscreen(); |
virtual bool SwapBuffers(); |
+ virtual void SetSize(gfx::Size); |
virtual gfx::Size GetSize(); |
virtual void* GetHandle(); |
virtual void SetSwapInterval(int interval); |
@@ -411,6 +413,12 @@ |
return ::SwapBuffers(device_context_) == TRUE; |
} |
+void NativeViewGLContext::SetSize(gfx::Size size) { |
+ UINT swp_flags = SWP_NOSENDCHANGING | SWP_NOOWNERZORDER | SWP_NOCOPYBITS | |
+ SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_DEFERERASE; |
+ SetWindowPos(window_, NULL, 0, 0, size.width(), size.height(), swp_flags); |
+} |
+ |
gfx::Size NativeViewGLContext::GetSize() { |
RECT rect; |
CHECK(GetClientRect(window_, &rect)); |
@@ -527,6 +535,14 @@ |
// but GDI does not have those semantics. |
} |
+void OSMesaViewGLContext::SetSize(gfx::Size size) { |
+ UINT swp_flags = SWP_NOSENDCHANGING | SWP_NOOWNERZORDER | SWP_NOCOPYBITS | |
+ SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_DEFERERASE; |
+ SetWindowPos(window_, NULL, 0, 0, size.width(), size.height(), swp_flags); |
+ UpdateSize(); |
+} |
+ |
+ |
void OSMesaViewGLContext::UpdateSize() { |
// Change back buffer size to that of window. If window handle is invalid, do |
// not change the back buffer size. |