| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_impl.h" | 5 #include "cc/layers/layer_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 frame_timing_requests_dirty_ = false; | 691 frame_timing_requests_dirty_ = false; |
| 692 } | 692 } |
| 693 | 693 |
| 694 // Reset any state that should be cleared for the next update. | 694 // Reset any state that should be cleared for the next update. |
| 695 stacking_order_changed_ = false; | 695 stacking_order_changed_ = false; |
| 696 update_rect_ = gfx::Rect(); | 696 update_rect_ = gfx::Rect(); |
| 697 needs_push_properties_ = false; | 697 needs_push_properties_ = false; |
| 698 num_dependents_need_push_properties_ = 0; | 698 num_dependents_need_push_properties_ = 0; |
| 699 } | 699 } |
| 700 | 700 |
| 701 bool LayerImpl::IsAffectedByPageScale() const { | |
| 702 TransformTree& transform_tree = | |
| 703 layer_tree_impl()->property_trees()->transform_tree; | |
| 704 return transform_tree.Node(transform_tree_index()) | |
| 705 ->data.in_subtree_of_page_scale_layer; | |
| 706 } | |
| 707 | |
| 708 gfx::Vector2dF LayerImpl::FixedContainerSizeDelta() const { | 701 gfx::Vector2dF LayerImpl::FixedContainerSizeDelta() const { |
| 709 LayerImpl* scroll_clip_layer = | 702 LayerImpl* scroll_clip_layer = |
| 710 layer_tree_impl()->LayerById(scroll_clip_layer_id_); | 703 layer_tree_impl()->LayerById(scroll_clip_layer_id_); |
| 711 if (!scroll_clip_layer) | 704 if (!scroll_clip_layer) |
| 712 return gfx::Vector2dF(); | 705 return gfx::Vector2dF(); |
| 713 | 706 |
| 714 return scroll_clip_layer->bounds_delta(); | 707 return scroll_clip_layer->bounds_delta(); |
| 715 } | 708 } |
| 716 | 709 |
| 717 base::DictionaryValue* LayerImpl::LayerTreeAsJson() const { | 710 base::DictionaryValue* LayerImpl::LayerTreeAsJson() const { |
| (...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1907 .layer_transforms_should_scale_layer_contents) { | 1900 .layer_transforms_should_scale_layer_contents) { |
| 1908 return default_scale; | 1901 return default_scale; |
| 1909 } | 1902 } |
| 1910 | 1903 |
| 1911 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( | 1904 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( |
| 1912 DrawTransform(), default_scale); | 1905 DrawTransform(), default_scale); |
| 1913 return std::max(transform_scales.x(), transform_scales.y()); | 1906 return std::max(transform_scales.x(), transform_scales.y()); |
| 1914 } | 1907 } |
| 1915 | 1908 |
| 1916 } // namespace cc | 1909 } // namespace cc |
| OLD | NEW |