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

Side by Side Diff: cc/layers/layer.cc

Issue 1565783002: Revert of Determine a layer's IsAffectedByPageScale property without using Layer Tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « cc/layers/heads_up_display_layer_impl_unittest.cc ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layers/layer.h" 5 #include "cc/layers/layer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after
1345 1345
1346 if (layer->layer_animation_controller() && layer_animation_controller_) 1346 if (layer->layer_animation_controller() && layer_animation_controller_)
1347 layer_animation_controller_->PushAnimationUpdatesTo( 1347 layer_animation_controller_->PushAnimationUpdatesTo(
1348 layer->layer_animation_controller()); 1348 layer->layer_animation_controller());
1349 1349
1350 if (frame_timing_requests_dirty_) { 1350 if (frame_timing_requests_dirty_) {
1351 layer->SetFrameTimingRequests(frame_timing_requests_); 1351 layer->SetFrameTimingRequests(frame_timing_requests_);
1352 frame_timing_requests_dirty_ = false; 1352 frame_timing_requests_dirty_ = false;
1353 } 1353 }
1354 1354
1355 bool is_page_scale_layer = this == layer_tree_host()->page_scale_layer();
1356 bool parent_affected =
1357 layer->parent() && layer->parent()->IsAffectedByPageScale();
1358 layer->SetIsAffectedByPageScale(is_page_scale_layer || parent_affected);
1359
1355 // Reset any state that should be cleared for the next update. 1360 // Reset any state that should be cleared for the next update.
1356 stacking_order_changed_ = false; 1361 stacking_order_changed_ = false;
1357 update_rect_ = gfx::Rect(); 1362 update_rect_ = gfx::Rect();
1358 1363
1359 needs_push_properties_ = false; 1364 needs_push_properties_ = false;
1360 num_dependents_need_push_properties_ = 0; 1365 num_dependents_need_push_properties_ = 0;
1361 } 1366 }
1362 1367
1363 void Layer::SetTypeForProtoSerialization(proto::LayerNode* proto) const { 1368 void Layer::SetTypeForProtoSerialization(proto::LayerNode* proto) const {
1364 proto->set_type(proto::LayerType::Base); 1369 proto->set_type(proto::LayerType::Base);
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
2036 this, layer_tree_host_->property_trees()->transform_tree); 2041 this, layer_tree_host_->property_trees()->transform_tree);
2037 } 2042 }
2038 2043
2039 gfx::Transform Layer::screen_space_transform() const { 2044 gfx::Transform Layer::screen_space_transform() const {
2040 DCHECK_NE(transform_tree_index_, -1); 2045 DCHECK_NE(transform_tree_index_, -1);
2041 return ScreenSpaceTransformFromPropertyTrees( 2046 return ScreenSpaceTransformFromPropertyTrees(
2042 this, layer_tree_host_->property_trees()->transform_tree); 2047 this, layer_tree_host_->property_trees()->transform_tree);
2043 } 2048 }
2044 2049
2045 } // namespace cc 2050 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/heads_up_display_layer_impl_unittest.cc ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698