Chromium Code Reviews| Index: content/common/gpu/image_transport_surface_linux.cc |
| diff --git a/content/common/gpu/image_transport_surface_linux.cc b/content/common/gpu/image_transport_surface_linux.cc |
| index a394c9b6a7b8fe6449ee3c35f5e96500bd2e8fff..cfe5ae83b11fe252cf0d0095f5db68f9cd49e265 100644 |
| --- a/content/common/gpu/image_transport_surface_linux.cc |
| +++ b/content/common/gpu/image_transport_surface_linux.cc |
| @@ -112,6 +112,7 @@ class GLXImageTransportSurface : public ImageTransportSurface, |
| virtual bool SwapBuffers() OVERRIDE; |
| virtual gfx::Size GetSize() OVERRIDE; |
| virtual bool OnMakeCurrent(gfx::GLContext* context) OVERRIDE; |
| + virtual void SetVisible(bool visible) OVERRIDE; |
| protected: |
| // ImageTransportSurface implementation: |
| @@ -461,6 +462,17 @@ void GLXImageTransportSurface::ReleaseSurface() { |
| bound_ = false; |
| } |
| +void GLXImageTransportSurface::SetVisible(bool visible) { |
| + Display* dpy = static_cast<Display*>(GetDisplay()); |
| + if (!visible) { |
| + XResizeWindow(dpy, window_, 1, 1); |
| + needs_resize_ = true; |
|
piman
2011/11/17 15:49:34
Wouldn't you want to set needs_resize_ in the othe
jonathan.backer
2011/11/17 15:56:09
Done.
|
| + } else { |
| + XResizeWindow(dpy, window_, size_.width(), size_.height()); |
| + } |
| + glXWaitX(); |
| +} |
| + |
| void GLXImageTransportSurface::OnResize(gfx::Size size) { |
| TRACE_EVENT0("gpu", "GLXImageTransportSurface::OnResize"); |
| size_ = size; |