Index: content/common/gpu/image_transport_surface_android.cc |
diff --git a/content/common/gpu/image_transport_surface_android.cc b/content/common/gpu/image_transport_surface_android.cc |
index 8f374186338585569859286334c7698daf270d3c..14c0e98f2190ac31049f2455a58bdcda2bf6bd4f 100644 |
--- a/content/common/gpu/image_transport_surface_android.cc |
+++ b/content/common/gpu/image_transport_surface_android.cc |
@@ -15,6 +15,28 @@ |
namespace content { |
+namespace { |
+ |
+class AndroidImageTransportSurface : public PassThroughImageTransportSurface { |
+ public: |
+ AndroidImageTransportSurface(GpuChannelManager* manager, |
+ GpuCommandBufferStub* stub, |
+ gfx::GLSurface* surface) |
+ : PassThroughImageTransportSurface(manager, stub, surface) {} |
+ |
+ bool Resize(const gfx::Size& size, float scale_factor) override { |
+ bool result = PassThroughImageTransportSurface::Resize(size, scale_factor); |
+ manager_->gpu_memory_manager()->ScheduleManage( |
+ GpuMemoryManager::kScheduleManageNow); |
piman
2015/10/27 23:11:47
So, because of crbug.com/526196 , and after https:
|
+ return result; |
+ } |
+ |
+ private: |
+ ~AndroidImageTransportSurface() override {} |
+}; |
+ |
+} // namespace |
+ |
// static |
scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface( |
GpuChannelManager* manager, |
@@ -34,7 +56,7 @@ scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface( |
return scoped_refptr<gfx::GLSurface>(); |
return scoped_refptr<gfx::GLSurface>( |
- new PassThroughImageTransportSurface(manager, stub, surface.get())); |
+ new AndroidImageTransportSurface(manager, stub, surface.get())); |
} |
} // namespace content |