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

Unified Diff: content/gpu/gpu_info_collector_android.cc

Issue 12314013: [Android] Use 1/4 scale low resolution tiles on high-res devices (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
Index: content/gpu/gpu_info_collector_android.cc
diff --git a/content/gpu/gpu_info_collector_android.cc b/content/gpu/gpu_info_collector_android.cc
index 2d594cfcc732de4db84bf5a47b64ff809231da33..99a6696a4e198c700fd27d091e553cd54e9d58ab 100644
--- a/content/gpu/gpu_info_collector_android.cc
+++ b/content/gpu/gpu_info_collector_android.cc
@@ -11,6 +11,7 @@
#include "base/string_piece.h"
#include "base/string_util.h"
#include "base/strings/string_split.h"
+#include "cc/switches.h"
#include "content/public/common/content_switches.h"
#include "ui/gfx/android/device_display_info.h"
@@ -123,6 +124,15 @@ bool CollectBasicGraphicsInfo(content::GPUInfo* gpu_info) {
switches::kDefaultTileHeight, size.str());
}
+ // Increase the resolution of low resolution tiles for devices with high
+ // resolution displays.
+ if (default_tile_size >= 512 &&
+ !CommandLine::ForCurrentProcess()->HasSwitch(
+ cc::switches::kLowResolutionContentsScaleFactor)) {
+ CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+ cc::switches::kLowResolutionContentsScaleFactor, "4");
+ }
+
return true;
}

Powered by Google App Engine
This is Rietveld 408576698