summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordanakj <danakj@chromium.org>2015-08-07 17:36:54 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-08 00:38:03 +0000
commit0006e95b207be0bca6a8e6850e2d1f5147b453e4 (patch)
tree4b79807c38ba59012e460ec73afc061a7b86674c
parent76b4a982964ffefeffa73af775f92d4c22d48791 (diff)
downloadchromium_src-0006e95b207be0bca6a8e6850e2d1f5147b453e4.zip
chromium_src-0006e95b207be0bca6a8e6850e2d1f5147b453e4.tar.gz
chromium_src-0006e95b207be0bca6a8e6850e2d1f5147b453e4.tar.bz2
cc: Use occlusion for deciding raster/eviction priorities in browser
The browser compositor should use occlusion to allow lots of overlapping windows to take up less memory. This reduces our memory consumption in ash a bit. Though, the window UI is not considered opaque currently, so more memory is still used than could be otherwise. R=enne, vmpstr CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1277053002 Cr-Commit-Position: refs/heads/master@{#342493}
-rw-r--r--cc/tiles/prioritized_tile.cc1
-rw-r--r--ui/compositor/compositor.cc8
2 files changed, 6 insertions, 3 deletions
diff --git a/cc/tiles/prioritized_tile.cc b/cc/tiles/prioritized_tile.cc
index 67f33c9..2e0246c 100644
--- a/cc/tiles/prioritized_tile.cc
+++ b/cc/tiles/prioritized_tile.cc
@@ -33,6 +33,7 @@ void PrioritizedTile::AsValueInto(base::trace_event::TracedValue* value) const {
value->BeginDictionary("combined_priority");
priority().AsValueInto(value);
+ value->SetBoolean("is_occluded", is_occluded_);
value->EndDictionary();
value->SetString("resolution", TileResolutionToString(priority().resolution));
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index b5474a7..42e51cb 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -85,10 +85,12 @@ Compositor::Compositor(gfx::AcceleratedWidget widget,
cc::LayerTreeSettings settings;
- // When impl-side painting is enabled, this will ensure PictureLayers always
- // can have LCD text, to match the previous behaviour with ContentLayers,
- // where LCD-not-allowed notifications were ignored.
+ // This will ensure PictureLayers always can have LCD text, to match the
+ // previous behaviour with ContentLayers, where LCD-not-allowed notifications
+ // were ignored.
settings.layers_always_allowed_lcd_text = true;
+ // Use occlusion to allow more overlapping windows to take less memory.
+ settings.use_occlusion_for_tile_prioritization = true;
settings.renderer_settings.refresh_rate =
context_factory_->DoesCreateTestContexts() ? kTestRefreshRate
: kDefaultRefreshRate;