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

Unified Diff: cc/layers/layer_impl.cc

Issue 1924933002: cc : Stop pushing properties not used by LayerImpl to LayerImpl (4) (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 d30ba54783e3c95adfe2702dd70bfa467795e3d2..84859e9d570aee0a7f92570bcd942f164318bcbb 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -45,8 +45,6 @@
namespace cc {
LayerImpl::LayerImpl(LayerTreeImpl* tree_impl, int id)
: parent_(nullptr),
- scroll_parent_(nullptr),
- clip_parent_(nullptr),
mask_layer_id_(-1),
mask_layer_(nullptr),
replica_layer_id_(-1),
@@ -148,17 +146,6 @@ void LayerImpl::ClearLinksToOtherLayers() {
replica_layer_ = nullptr;
}
-void LayerImpl::SetScrollParent(LayerImpl* parent) {
- if (scroll_parent_ == parent)
- return;
-
- if (parent)
- DCHECK_EQ(layer_tree_impl()->LayerById(parent->id()), parent);
-
- scroll_parent_ = parent;
- SetNeedsPushProperties();
-}
-
void LayerImpl::SetDebugInfo(
std::unique_ptr<base::trace_event::ConvertableToTraceFormat> debug_info) {
owned_debug_info_ = std::move(debug_info);
@@ -166,13 +153,6 @@ void LayerImpl::SetDebugInfo(
SetNeedsPushProperties();
}
-void LayerImpl::SetScrollChildren(std::set<LayerImpl*>* children) {
- if (scroll_children_.get() == children)
- return;
- scroll_children_.reset(children);
- SetNeedsPushProperties();
-}
-
void LayerImpl::DistributeScroll(ScrollState* scroll_state) {
DCHECK(scroll_state);
if (scroll_state->FullyConsumed())
@@ -199,21 +179,6 @@ void LayerImpl::ApplyScroll(ScrollState* scroll_state) {
layer_tree_impl()->ApplyScroll(node, scroll_state);
}
-void LayerImpl::SetClipParent(LayerImpl* ancestor) {
- if (clip_parent_ == ancestor)
- return;
-
- clip_parent_ = ancestor;
- SetNeedsPushProperties();
-}
-
-void LayerImpl::SetClipChildren(std::set<LayerImpl*>* children) {
- if (clip_children_.get() == children)
- return;
- clip_children_.reset(children);
- SetNeedsPushProperties();
-}
-
void LayerImpl::SetTransformTreeIndex(int index) {
transform_tree_index_ = index;
SetNeedsPushProperties();
@@ -517,47 +482,6 @@ void LayerImpl::PushPropertiesTo(LayerImpl* layer) {
layer->SetScrollTreeIndex(scroll_tree_index_);
layer->set_offset_to_transform_parent(offset_to_transform_parent_);
- LayerImpl* scroll_parent = nullptr;
- if (scroll_parent_) {
- scroll_parent = layer->layer_tree_impl()->LayerById(scroll_parent_->id());
- DCHECK(scroll_parent);
- }
-
- layer->SetScrollParent(scroll_parent);
- if (scroll_children_) {
- std::set<LayerImpl*>* scroll_children = new std::set<LayerImpl*>;
- for (std::set<LayerImpl*>::iterator it = scroll_children_->begin();
- it != scroll_children_->end();
- ++it) {
- DCHECK_EQ((*it)->scroll_parent(), this);
- LayerImpl* scroll_child =
- layer->layer_tree_impl()->LayerById((*it)->id());
- DCHECK(scroll_child);
- scroll_children->insert(scroll_child);
- }
- layer->SetScrollChildren(scroll_children);
- } else {
- layer->SetScrollChildren(nullptr);
- }
-
- LayerImpl* clip_parent = nullptr;
- if (clip_parent_) {
- clip_parent = layer->layer_tree_impl()->LayerById(
- clip_parent_->id());
- DCHECK(clip_parent);
- }
-
- layer->SetClipParent(clip_parent);
- if (clip_children_) {
- std::set<LayerImpl*>* clip_children = new std::set<LayerImpl*>;
- for (std::set<LayerImpl*>::iterator it = clip_children_->begin();
- it != clip_children_->end(); ++it)
- clip_children->insert(layer->layer_tree_impl()->LayerById((*it)->id()));
- layer->SetClipChildren(clip_children);
- } else {
- layer->SetClipChildren(nullptr);
- }
-
layer->PassCopyRequests(&copy_requests_);
// If the main thread commits multiple times before the impl thread actually
@@ -1366,12 +1290,6 @@ void LayerImpl::AsValueInto(base::trace_event::TracedValue* state) const {
state->EndDictionary();
}
- if (scroll_parent_)
- state->SetInteger("scroll_parent", scroll_parent_->id());
-
- if (clip_parent_)
- state->SetInteger("clip_parent", clip_parent_->id());
-
state->SetBoolean("can_use_lcd_text", can_use_lcd_text());
state->SetBoolean("contents_opaque", contents_opaque());
« 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