diff options
Diffstat (limited to 'content')
-rw-r--r-- | content/gpu/gpu_info_collector_android.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/content/gpu/gpu_info_collector_android.cc b/content/gpu/gpu_info_collector_android.cc index 233f8ca..a38826b 100644 --- a/content/gpu/gpu_info_collector_android.cc +++ b/content/gpu/gpu_info_collector_android.cc @@ -12,6 +12,7 @@ #include "base/string_split.h" #include "base/string_util.h" #include "content/public/common/content_switches.h" +#include "ui/gfx/android/device_display_info.h" namespace { @@ -87,8 +88,20 @@ bool CollectBasicGraphicsInfo(content::GPUInfo* gpu_info) { switches::kEnableVirtualGLContexts); } + gfx::DeviceDisplayInfo info; int default_tile_size = 256; + // For very high resolution displays (eg. Nexus 10), set the default + // tile size to be 512. This should be removed in favour of a generic + // hueristic that works across all platforms and devices, once that + // exists: http://crbug.com/159524. This switches to 512 for screens + // containing 40 or more 256x256 tiles, such that 1080p devices do + // not use 512x512 tiles (eg. 1920x1280 requires 37.5 tiles) + int numTiles = (info.GetDisplayWidth() * + info.GetDisplayHeight()) / (256 * 256); + if (numTiles >= 40) + default_tile_size = 512; + // IMG: Fast async texture uploads only work with non-power-of-two, // but still multiple-of-eight sizes. // http://crbug.com/168099 |