Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(481)

Unified Diff: content/common/gpu/image_transport_surface_android.cc

Issue 1420503011: GLES2CmdDecoder should resize GLSurface using GLSurface::Resize (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/gpu/image_transport_surface.cc ('k') | content/common/gpu/image_transport_surface_fbo_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « content/common/gpu/image_transport_surface.cc ('k') | content/common/gpu/image_transport_surface_fbo_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698