| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |