| 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 |
| 701 gfx::Vector2dF LayerImpl::FixedContainerSizeDelta() const { | 708 gfx::Vector2dF LayerImpl::FixedContainerSizeDelta() const { |
| 702 LayerImpl* scroll_clip_layer = | 709 LayerImpl* scroll_clip_layer = |
| 703 layer_tree_impl()->LayerById(scroll_clip_layer_id_); | 710 layer_tree_impl()->LayerById(scroll_clip_layer_id_); |
| 704 if (!scroll_clip_layer) | 711 if (!scroll_clip_layer) |
| 705 return gfx::Vector2dF(); | 712 return gfx::Vector2dF(); |
| 706 | 713 |
| 707 return scroll_clip_layer->bounds_delta(); | 714 return scroll_clip_layer->bounds_delta(); |
| 708 } | 715 } |
| 709 | 716 |
| 710 base::DictionaryValue* LayerImpl::LayerTreeAsJson() const { | 717 base::DictionaryValue* LayerImpl::LayerTreeAsJson() const { |
| (...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1900 .layer_transforms_should_scale_layer_contents) { | 1907 .layer_transforms_should_scale_layer_contents) { |
| 1901 return default_scale; | 1908 return default_scale; |
| 1902 } | 1909 } |
| 1903 | 1910 |
| 1904 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( | 1911 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( |
| 1905 DrawTransform(), default_scale); | 1912 DrawTransform(), default_scale); |
| 1906 return std::max(transform_scales.x(), transform_scales.y()); | 1913 return std::max(transform_scales.x(), transform_scales.y()); |
| 1907 } | 1914 } |
| 1908 | 1915 |
| 1909 } // namespace cc | 1916 } // namespace cc |
| OLD | NEW |