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

Unified Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 1248253003: Add better support for RGBA_4444 textures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and forward flags Created 5 years, 4 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/public/common/content_switches.cc ('k') | gpu/command_buffer/service/image_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « content/public/common/content_switches.cc ('k') | gpu/command_buffer/service/image_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698