| Index: content/common/gpu/image_transport_surface_win.cc
|
| diff --git a/content/common/gpu/image_transport_surface_win.cc b/content/common/gpu/image_transport_surface_win.cc
|
| index 9a8e549a72ff014d93a3ee4d655457ce70e712f1..b6fe4def84f26e99f05652715926cdeb34c86709 100644
|
| --- a/content/common/gpu/image_transport_surface_win.cc
|
| +++ b/content/common/gpu/image_transport_surface_win.cc
|
| @@ -40,7 +40,7 @@ class PbufferImageTransportSurface
|
| virtual bool SwapBuffers() OVERRIDE;
|
| virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE;
|
| virtual std::string GetExtensions() OVERRIDE;
|
| - virtual void SetVisible(bool visible) OVERRIDE;
|
| + virtual void SetResourceUsage(ResourceUsage resourceUsage) OVERRIDE;
|
|
|
| protected:
|
| // ImageTransportSurface implementation
|
| @@ -121,16 +121,21 @@ bool PbufferImageTransportSurface::PostSubBuffer(
|
| return false;
|
| }
|
|
|
| -void PbufferImageTransportSurface::SetVisible(bool visible) {
|
| - if (visible == is_visible_)
|
| - return;
|
| -
|
| - is_visible_ = visible;
|
| -
|
| - if (visible)
|
| - Resize(visible_size_);
|
| - else
|
| - Resize(gfx::Size(1, 1));
|
| +void PbufferImageTransportSurface::SetResourceUsage(
|
| + ResourceUsage resourceUsage) {
|
| + switch (resourceUsage) {
|
| + case RESOURCE_USAGE_FULL:
|
| + Resize(visible_size_);
|
| + is_visible_ = true;
|
| + break;
|
| + case RESOURCE_USAGE_LESS:
|
| + Resize(gfx::Size(1, 1));
|
| + is_visible_ = false;
|
| + break;
|
| + case RESOURCE_USAGE_NONE:
|
| + // TODO(mmocny): drop all the buffers
|
| + break;
|
| + }
|
| }
|
|
|
| std::string PbufferImageTransportSurface::GetExtensions() {
|
|
|