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

Unified Diff: blimp/client/support/compositor/blimp_layer_tree_settings.cc

Issue 2613303002: android: Use ScreenInfo to calculate tile size (Closed)
Patch Set: delete blimp Created 3 years, 11 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 | « no previous file | content/renderer/gpu/render_widget_compositor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/client/support/compositor/blimp_layer_tree_settings.cc
diff --git a/blimp/client/support/compositor/blimp_layer_tree_settings.cc b/blimp/client/support/compositor/blimp_layer_tree_settings.cc
index 9f31e72d7c62718781eaededf365bd79efe2aeeb..0971dfb8d4738c205d7851f72cf61549953ee302 100644
--- a/blimp/client/support/compositor/blimp_layer_tree_settings.cc
+++ b/blimp/client/support/compositor/blimp_layer_tree_settings.cc
@@ -17,10 +17,6 @@
#include "ui/gfx/buffer_types.h"
#include "ui/gl/gl_switches.h"
-#if defined(OS_ANDROID)
-#include "ui/gfx/android/device_display_info.h"
-#endif
-
namespace blimp {
namespace client {
@@ -171,45 +167,6 @@ void PopulateCommonLayerTreeSettings(cc::LayerTreeSettings* settings) {
#endif
int default_tile_size = 256;
-#if defined(OS_ANDROID)
- gfx::DeviceDisplayInfo info;
- bool real_size_supported = true;
- int display_width = info.GetPhysicalDisplayWidth();
- int display_height = info.GetPhysicalDisplayHeight();
- if (display_width == 0 || display_height == 0) {
- real_size_supported = false;
- display_width = info.GetDisplayWidth();
- display_height = info.GetDisplayHeight();
- }
-
- int portrait_width = std::min(display_width, display_height);
- int landscape_width = std::max(display_width, display_height);
-
- if (real_size_supported) {
- // Maximum HD dimensions should be 768x1280
- // Maximum FHD dimensions should be 1200x1920
- if (portrait_width > 768 || landscape_width > 1280)
- default_tile_size = 384;
- if (portrait_width > 1200 || landscape_width > 1920)
- default_tile_size = 512;
-
- // Adjust for some resolutions that barely straddle an extra
- // tile when in portrait mode. This helps worst case scroll/raster
- // by not needing a full extra tile for each row.
- if (default_tile_size == 256 && portrait_width == 768)
- default_tile_size += 32;
- if (default_tile_size == 384 && portrait_width == 1200)
- default_tile_size += 32;
- } else {
- // We don't know the exact resolution due to screen controls etc.
- // So this just estimates the values above using tile counts.
- int numTiles = (display_width * display_height) / (256 * 256);
- if (numTiles > 16)
- default_tile_size = 384;
- if (numTiles >= 40)
- default_tile_size = 512;
- }
-#endif
settings->default_tile_size.SetSize(default_tile_size, default_tile_size);
settings->renderer_settings.buffer_to_texture_target_map =
« no previous file with comments | « no previous file | content/renderer/gpu/render_widget_compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698