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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 196473007: Add --disable-low-res-tiling. Disable low res tiling to save power. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Resolve merge conflicts Created 6 years, 9 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 | « cc/layers/picture_layer_impl.h ('k') | cc/trees/layer_tree_settings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl.cc
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index 9ec6fac5c412c7dff2a8c98c38dfecaa0625ad26..8ada9aaf65af011b987e141fb624feba034d4555 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -54,7 +54,8 @@ PictureLayerImpl::PictureLayerImpl(LayerTreeImpl* tree_impl, int id)
is_using_lcd_text_(tree_impl->settings().can_use_lcd_text),
needs_post_commit_initialization_(true),
should_update_tile_priorities_(false),
- has_gpu_rasterization_hint_(false) {}
+ has_gpu_rasterization_hint_(false),
+ should_use_low_res_tiling_(tree_impl->settings().create_low_res_tiling) {}
PictureLayerImpl::~PictureLayerImpl() {}
@@ -468,6 +469,8 @@ skia::RefPtr<SkPicture> PictureLayerImpl::GetPicture() {
void PictureLayerImpl::SetHasGpuRasterizationHint(bool has_hint) {
bool old_should_use_gpu_rasterization = ShouldUseGpuRasterization();
has_gpu_rasterization_hint_ = has_hint;
+ if (has_gpu_rasterization_hint_)
+ should_use_low_res_tiling_ = false;
if (ShouldUseGpuRasterization() != old_should_use_gpu_rasterization)
RemoveAllTilings();
}
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/trees/layer_tree_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698