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

Unified Diff: cc/layers/layer_impl.cc

Issue 1918593002: cc : Stop pushing properties not used by LayerImpl to LayerImpl (3) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/layer_impl.h ('k') | cc/layers/layer_impl_test_properties.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index df638f17b6367259bee99d2678a3716fb595f1ad..e7147025f5632257ad50e7c56f7bcc1b169b66d7 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -59,19 +59,15 @@ LayerImpl::LayerImpl(LayerTreeImpl* tree_impl, int id)
MainThreadScrollingReason::kNotScrollingOnMain),
user_scrollable_horizontal_(true),
user_scrollable_vertical_(true),
- should_flatten_transform_(true),
should_flatten_transform_from_property_tree_(false),
layer_property_changed_(false),
masks_to_bounds_(false),
contents_opaque_(false),
- is_root_for_isolated_group_(false),
use_parent_backface_visibility_(false),
use_local_transform_for_backface_visibility_(false),
should_check_backface_visibility_(false),
draws_content_(false),
hide_layer_and_subtree_(false),
- transform_is_invertible_(true),
- is_container_for_fixed_position_layers_(false),
is_affected_by_page_scale_(true),
was_ever_ready_since_last_transform_animation_(true),
background_color_(0),
@@ -79,7 +75,6 @@ LayerImpl::LayerImpl(LayerTreeImpl* tree_impl, int id)
opacity_(1.0),
blend_mode_(SkXfermode::kSrcOver_Mode),
draw_blend_mode_(SkXfermode::kSrcOver_Mode),
- num_descendants_that_draw_content_(0),
transform_tree_index_(-1),
effect_tree_index_(-1),
clip_tree_index_(-1),
@@ -204,13 +199,6 @@ void LayerImpl::ApplyScroll(ScrollState* scroll_state) {
layer_tree_impl()->ApplyScroll(node, scroll_state);
}
-void LayerImpl::SetNumDescendantsThatDrawContent(int num_descendants) {
- if (num_descendants_that_draw_content_ == num_descendants)
- return;
- num_descendants_that_draw_content_ = num_descendants;
- SetNeedsPushProperties();
-}
-
void LayerImpl::SetClipParent(LayerImpl* ancestor) {
if (clip_parent_ == ancestor)
return;
@@ -504,12 +492,7 @@ void LayerImpl::PushPropertiesTo(LayerImpl* layer) {
layer->SetContentsOpaque(contents_opaque_);
layer->SetOpacity(opacity_);
layer->SetBlendMode(blend_mode_);
- layer->SetIsRootForIsolatedGroup(is_root_for_isolated_group_);
layer->SetPosition(position_);
- layer->SetIsContainerForFixedPositionLayers(
- is_container_for_fixed_position_layers_);
- layer->SetPositionConstraint(position_constraint_);
- layer->SetShouldFlattenTransform(should_flatten_transform_);
layer->set_should_flatten_transform_from_property_tree(
should_flatten_transform_from_property_tree_);
layer->set_draw_blend_mode(draw_blend_mode_);
@@ -517,7 +500,7 @@ void LayerImpl::PushPropertiesTo(LayerImpl* layer) {
layer->SetUseLocalTransformForBackfaceVisibility(
use_local_transform_for_backface_visibility_);
layer->SetShouldCheckBackfaceVisibility(should_check_backface_visibility_);
- layer->SetTransformAndInvertibility(transform_, transform_is_invertible_);
+ layer->SetTransform(transform_);
if (layer_property_changed_)
layer->NoteLayerPropertyChanged();
@@ -528,7 +511,6 @@ void LayerImpl::PushPropertiesTo(LayerImpl* layer) {
layer->set_user_scrollable_vertical(user_scrollable_vertical_);
layer->Set3dSortingContextId(sorting_context_id_);
- layer->SetNumDescendantsThatDrawContent(num_descendants_that_draw_content_);
layer->SetTransformTreeIndex(transform_tree_index_);
layer->SetClipTreeIndex(clip_tree_index_);
@@ -1169,14 +1151,6 @@ void LayerImpl::SetBlendMode(SkXfermode::Mode blend_mode) {
blend_mode_ = blend_mode;
}
-void LayerImpl::SetIsRootForIsolatedGroup(bool root) {
- if (is_root_for_isolated_group_ == root)
- return;
-
- is_root_for_isolated_group_ = root;
- SetNeedsPushProperties();
-}
-
void LayerImpl::SetPosition(const gfx::PointF& position) {
if (position_ == position)
return;
@@ -1184,13 +1158,6 @@ void LayerImpl::SetPosition(const gfx::PointF& position) {
position_ = position;
}
-void LayerImpl::SetShouldFlattenTransform(bool flatten) {
- if (should_flatten_transform_ == flatten)
- return;
-
- should_flatten_transform_ = flatten;
-}
-
void LayerImpl::Set3dSortingContextId(int id) {
if (id == sorting_context_id_)
return;
@@ -1202,18 +1169,6 @@ void LayerImpl::SetTransform(const gfx::Transform& transform) {
return;
transform_ = transform;
- transform_is_invertible_ = transform_.IsInvertible();
-}
-
-void LayerImpl::SetTransformAndInvertibility(const gfx::Transform& transform,
- bool transform_is_invertible) {
- if (transform_ == transform) {
- DCHECK(transform_is_invertible_ == transform_is_invertible)
- << "Can't change invertibility if transform is unchanged";
- return;
- }
- transform_ = transform;
- transform_is_invertible_ = transform_is_invertible;
}
bool LayerImpl::TransformIsAnimating() const {
@@ -1379,8 +1334,6 @@ void LayerImpl::AsValueInto(base::trace_event::TracedValue* state) const {
if (!transform().IsIdentity())
MathUtil::AddToTracedValue("transform", transform(), state);
- state->SetBoolean("should_flatten", should_flatten_transform_);
-
bool clipped;
gfx::QuadF layer_quad =
MathUtil::MapQuad(ScreenSpaceTransform(),
@@ -1462,10 +1415,6 @@ void LayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) {
benchmark->RunOnLayer(this);
}
-int LayerImpl::NumDescendantsThatDrawContent() const {
- return num_descendants_that_draw_content_;
-}
-
void LayerImpl::SetHasRenderSurface(bool should_have_render_surface) {
if (!!render_surface() == should_have_render_surface)
return;
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/layer_impl_test_properties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698