From ead52b5044d4aa196a3c81b5582c5b39ec79008e Mon Sep 17 00:00:00 2001 From: "sievers@chromium.org" Date: Thu, 14 Feb 2013 23:09:07 +0000 Subject: Revert 179298 > Use 256x256 textures on N10 > > Using 512x512 means that small layers take up disproportionately large > amounts of space. Moreover, the rationale for this original change has > disappeared in the move to impl-side painting and async texture uploads. > Since the intent is to move to this path wholesale, it is safe to remove this > code completely. > (notry since try failures looked ok) > > R=epenner,piman > > BUG=172655 > NOTRY=True > > Review URL: https://chromiumcodereview.appspot.com/12095028 NOTRY=True TBR=nduca@chromium.org Review URL: https://chromiumcodereview.appspot.com/12253023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182567 0039d316-1c4b-4281-b951-d872f2087c98 --- content/gpu/gpu_info_collector_android.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'content') 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 -- cgit v1.1