| Index: cc/layers/layer_impl.cc
|
| diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
|
| index c0badc3bd70ab98621bc2eec3dbb1ba0c42fdaef..8d1d2e4a10c28619e7e070757c649acd058f5b03 100644
|
| --- a/cc/layers/layer_impl.cc
|
| +++ b/cc/layers/layer_impl.cc
|
| @@ -1192,7 +1192,7 @@ void LayerImpl::AsValueInto(base::trace_event::TracedValue* state) const {
|
| state->EndDictionary();
|
| }
|
|
|
| - state->SetBoolean("can_use_lcd_text", can_use_lcd_text());
|
| + state->SetBoolean("can_use_lcd_text", CanUseLCDText());
|
| state->SetBoolean("contents_opaque", contents_opaque());
|
|
|
| state->SetBoolean("has_animation_bounds",
|
| @@ -1268,6 +1268,33 @@ gfx::Transform LayerImpl::ScreenSpaceTransform() const {
|
| return draw_properties().screen_space_transform;
|
| }
|
|
|
| +bool LayerImpl::CanUseLCDText() const {
|
| + if (layer_tree_impl()->settings().layers_always_allowed_lcd_text)
|
| + return true;
|
| + if (!layer_tree_impl()->settings().can_use_lcd_text)
|
| + return false;
|
| + if (!contents_opaque())
|
| + return false;
|
| +
|
| + if (layer_tree_impl()
|
| + ->property_trees()
|
| + ->effect_tree.Node(effect_tree_index())
|
| + ->data.screen_space_opacity != 1.f)
|
| + return false;
|
| + if (!layer_tree_impl()
|
| + ->property_trees()
|
| + ->transform_tree.Node(transform_tree_index())
|
| + ->data.node_and_ancestors_have_only_integer_translation)
|
| + return false;
|
| + if (static_cast<int>(offset_to_transform_parent().x()) !=
|
| + offset_to_transform_parent().x())
|
| + return false;
|
| + if (static_cast<int>(offset_to_transform_parent().y()) !=
|
| + offset_to_transform_parent().y())
|
| + return false;
|
| + return true;
|
| +}
|
| +
|
| Region LayerImpl::GetInvalidationRegionForDebugging() {
|
| return Region(update_rect_);
|
| }
|
|
|