| 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 079294f2bcdcc833edb527e8a9d3e92dd1985673..f003b5efa6cc4bff3b0896acfe86c292d034da10 100644
|
| --- a/content/common/gpu/image_transport_surface_linux.cc
|
| +++ b/content/common/gpu/image_transport_surface_linux.cc
|
| @@ -69,6 +69,7 @@ class EGLImageTransportSurface : public ImageTransportSurface,
|
| virtual gfx::Size GetSize() OVERRIDE;
|
| virtual void OnMakeCurrent(gfx::GLContext* context) OVERRIDE;
|
| virtual unsigned int GetBackingFrameBufferObject() OVERRIDE;
|
| + virtual void SetVisible(bool visible) OVERRIDE;
|
|
|
| protected:
|
| // ImageTransportSurface implementation
|
| @@ -270,6 +271,15 @@ unsigned int EGLImageTransportSurface::GetBackingFrameBufferObject() {
|
| return fbo_id_;
|
| }
|
|
|
| +void EGLImageTransportSurface::SetVisible(bool visible) {
|
| + if (!visible && back_surface_.get() && front_surface_.get()) {
|
| + ReleaseSurface(&back_surface_);
|
| + } else if (visible && !back_surface_.get() && front_surface_.get()) {
|
| + // Leverage the OnResize hook because it does exactly what we want
|
| + OnResize(front_surface_->size());
|
| + }
|
| +}
|
| +
|
| void EGLImageTransportSurface::ReleaseSurface(
|
| scoped_refptr<EGLAcceleratedSurface>* surface) {
|
| if (surface->get()) {
|
|
|