summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorjinsukkim <jinsukkim@chromium.org>2016-03-24 16:08:53 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-24 23:12:01 +0000
commit5c3c0ed623b57b16e3c89c6172a3b24fcf65337c (patch)
treef2a8f1e62f4227ef3a06ee3b47f4c8447fa6001a /content
parent68de803474c115c96b034175b7e6f4db7bc25dff (diff)
downloadchromium_src-5c3c0ed623b57b16e3c89c6172a3b24fcf65337c.zip
chromium_src-5c3c0ed623b57b16e3c89c6172a3b24fcf65337c.tar.gz
chromium_src-5c3c0ed623b57b16e3c89c6172a3b24fcf65337c.tar.bz2
Android: fix memory regression on svelte device
Virtualized GL contexts were being disabled for some non-full screen video due to the attribute |alpha| used for context creation requests made in RenderWidget/RenderThreadImp was true. This CL check the surface type (on/off) to disable virtualized GL only for onscreen surfaces whose format doesn't match the default. BUG=594083, 591100 Review URL: https://codereview.chromium.org/1818303002 Cr-Commit-Position: refs/heads/master@{#383179}
Diffstat (limited to 'content')
-rw-r--r--content/common/gpu/gpu_command_buffer_stub.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index ca4689b..ea4d944 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -243,7 +243,8 @@ GpuCommandBufferStub::GpuCommandBufferStub(
surface_format_ = gfx::GLSurface::SURFACE_RGB565;
gfx::GLSurface* defaultOffscreenSurface =
channel_->gpu_channel_manager()->GetDefaultOffscreenSurface();
- if (surface_format_ != defaultOffscreenSurface->GetFormat())
+ bool is_onscreen = (surface_handle_ != gpu::kNullSurfaceHandle);
+ if (surface_format_ != defaultOffscreenSurface->GetFormat() && is_onscreen)
use_virtualized_gl_context_ = false;
#endif