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

Unified Diff: cc/layers/layer_impl.cc

Issue 1908593002: cc : Stop pushing transform origin from Layer and LayerImpl. (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
Index: cc/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index b7c0c1fd6018d51937571a8b0541ba37729f8065..f6f8107356eb55115330cd06763625368d822707 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -53,6 +53,7 @@ LayerImpl::LayerImpl(LayerTreeImpl* tree_impl, int id)
replica_layer_(nullptr),
layer_id_(id),
layer_tree_impl_(tree_impl),
+ test_properties_(nullptr),
scroll_clip_layer_id_(Layer::INVALID_ID),
main_thread_scrolling_reasons_(
MainThreadScrollingReason::kNotScrollingOnMain),
@@ -485,7 +486,6 @@ void LayerImpl::set_main_thread_scrolling_reasons(
}
void LayerImpl::PushPropertiesTo(LayerImpl* layer) {
- layer->SetTransformOrigin(transform_origin_);
layer->SetBackgroundColor(background_color_);
layer->SetSafeOpaqueBackgroundColor(safe_opaque_background_color_);
layer->SetBounds(bounds_);
@@ -1051,10 +1051,11 @@ void LayerImpl::SetHideLayerAndSubtree(bool hide) {
hide_layer_and_subtree_ = hide;
}
-void LayerImpl::SetTransformOrigin(const gfx::Point3F& transform_origin) {
- if (transform_origin_ == transform_origin)
- return;
- transform_origin_ = transform_origin;
+void LayerImpl::SetTransformOriginForTesting(
+ const gfx::Point3F& transform_origin) {
+ if (!test_properties_)
+ test_properties_ = new LayerImplTestProperties();
+ test_properties_->transform_origin = transform_origin;
}
void LayerImpl::SetBackgroundColor(SkColor background_color) {
@@ -1394,8 +1395,6 @@ void LayerImpl::AsValueInto(base::trace_event::TracedValue* state) const {
MathUtil::AddToTracedValue("scroll_offset", CurrentScrollOffset(), state);
- MathUtil::AddToTracedValue("transform_origin", transform_origin_, state);
-
if (!transform().IsIdentity())
MathUtil::AddToTracedValue("transform", transform(), state);

Powered by Google App Engine
This is Rietveld 408576698