Index: content/renderer/gpu/render_widget_compositor.cc |
diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc |
index 6c2b12ba2b7524cd79176efc5790696097aec3bd..74aae79f48e2d3dfb8ab96b41942c94c1c4f9448 100644 |
--- a/content/renderer/gpu/render_widget_compositor.cc |
+++ b/content/renderer/gpu/render_widget_compositor.cc |
@@ -405,16 +405,14 @@ |
// low end, so always use default policy. |
bool use_low_memory_policy = |
base::SysInfo::IsLowEndDevice() && !using_synchronous_compositor; |
+ // RGBA_4444 textures are only enabled by default for low end devices |
+ // and are disabled for Android WebView as it doesn't support the format. |
+ settings.renderer_settings.use_rgba_4444_textures = use_low_memory_policy; |
if (use_low_memory_policy) { |
// On low-end we want to be very carefull about killing other |
// apps. So initially we use 50% more memory to avoid flickering |
// or raster-on-demand. |
settings.max_memory_for_prepaint_percentage = 67; |
- |
- // RGBA_4444 textures are only enabled by default for low end devices |
- // and are disabled for Android WebView as it doesn't support the format. |
- if (!cmd->HasSwitch(switches::kDisableRGBA4444Textures)) |
- settings.renderer_settings.preferred_tile_format = cc::RGBA_4444; |
} else { |
// On other devices we have increased memory excessively to avoid |
// raster-on-demand already, so now we reserve 50% _only_ to avoid |
@@ -450,14 +448,10 @@ |
if (cmd->HasSwitch(cc::switches::kEnableBeginFrameScheduling)) |
settings.use_external_begin_frame_source = true; |
- if (cmd->HasSwitch(switches::kEnableRGBA4444Textures) && |
- !cmd->HasSwitch(switches::kDisableRGBA4444Textures)) { |
- settings.renderer_settings.preferred_tile_format = cc::RGBA_4444; |
- } |
- |
- if (cmd->HasSwitch(cc::switches::kEnableTileCompression)) { |
- settings.renderer_settings.preferred_tile_format = cc::ETC1; |
- } |
+ settings.renderer_settings.use_rgba_4444_textures |= |
+ cmd->HasSwitch(switches::kEnableRGBA4444Textures); |
+ settings.renderer_settings.use_rgba_4444_textures &= |
+ !cmd->HasSwitch(switches::kDisableRGBA4444Textures); |
if (widget_->for_oopif()) { |
// TODO(simonhong): Apply BeginFrame scheduling for OOPIF. |