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 705937aef1cb97930a4a5c9c16d1a460a4036502..5b9d781dc83df56a5ed2c82b935d37365782aa0a 100644 |
--- a/content/renderer/gpu/render_widget_compositor.cc |
+++ b/content/renderer/gpu/render_widget_compositor.cc |
@@ -421,7 +421,7 @@ void RenderWidgetCompositor::Initialize() { |
// low end, so always use default policy. |
bool use_low_memory_policy = |
base::SysInfo::IsLowEndDevice() && !synchronous_compositor_factory; |
- // RGBA_4444 textures are only enabled for low end devices |
+ // 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) { |
@@ -464,6 +464,11 @@ void RenderWidgetCompositor::Initialize() { |
if (cmd->HasSwitch(cc::switches::kEnableBeginFrameScheduling)) |
settings.use_external_begin_frame_source = true; |
+ 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. |
// See crbug.com/471411. |