Skip to content

Commit

Permalink
Android: fix memory regression on svelte device
Browse files Browse the repository at this point in the history
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}
  • Loading branch information
JinsukKim authored and Commit bot committed Mar 24, 2016
1 parent 68de803 commit 5c3c0ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion content/common/gpu/gpu_command_buffer_stub.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5c3c0ed

Please sign in to comment.