summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
Diffstat (limited to 'cc')
-rw-r--r--cc/layers/picture_layer_impl.cc5
-rw-r--r--cc/layers/picture_layer_impl.h3
-rw-r--r--cc/trees/layer_tree_settings.cc1
-rw-r--r--cc/trees/layer_tree_settings.h1
4 files changed, 8 insertions, 2 deletions
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index 9ec6fac..8ada9aa 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();
}
diff --git a/cc/layers/picture_layer_impl.h b/cc/layers/picture_layer_impl.h
index afa35f1..1d36f8d 100644
--- a/cc/layers/picture_layer_impl.h
+++ b/cc/layers/picture_layer_impl.h
@@ -87,7 +87,7 @@ class CC_EXPORT PictureLayerImpl
void RemoveAllTilings();
void SyncFromActiveLayer(const PictureLayerImpl* other);
void ManageTilings(bool animating_transform_to_screen);
- bool ShouldHaveLowResTiling() const { return !ShouldUseGpuRasterization(); }
+ bool ShouldHaveLowResTiling() const { return should_use_low_res_tiling_; }
virtual bool ShouldAdjustRasterScale(
bool animating_transform_to_screen) const;
virtual void RecalculateRasterScales(
@@ -146,6 +146,7 @@ class CC_EXPORT PictureLayerImpl
// after a CalculateContentsScale/ManageTilings.
bool should_update_tile_priorities_;
bool has_gpu_rasterization_hint_;
+ bool should_use_low_res_tiling_;
friend class PictureLayer;
DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl);
diff --git a/cc/trees/layer_tree_settings.cc b/cc/trees/layer_tree_settings.cc
index 6df0b585..a3994ae 100644
--- a/cc/trees/layer_tree_settings.cc
+++ b/cc/trees/layer_tree_settings.cc
@@ -26,6 +26,7 @@ LayerTreeSettings::LayerTreeSettings()
can_use_lcd_text(true),
should_clear_root_render_pass(true),
rasterization_site(CpuRasterization),
+ create_low_res_tiling(true),
scrollbar_animator(NoAnimator),
scrollbar_linear_fade_delay_ms(300),
scrollbar_linear_fade_length_ms(300),
diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h
index 3ad7bf3..ecafb8f 100644
--- a/cc/trees/layer_tree_settings.h
+++ b/cc/trees/layer_tree_settings.h
@@ -36,6 +36,7 @@ class CC_EXPORT LayerTreeSettings {
GpuRasterization,
};
RasterizationSite rasterization_site;
+ bool create_low_res_tiling;
enum ScrollbarAnimator {
NoAnimator,