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

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

Issue 1994333002: cc : Add IsInIdtoIndexMap to property tres (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/layer.cc ('k') | cc/trees/property_tree.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 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 <algorithm> 10 #include <algorithm>
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 child->SetParent(this); 118 child->SetParent(this);
119 DCHECK_EQ(layer_tree_impl(), child->layer_tree_impl()); 119 DCHECK_EQ(layer_tree_impl(), child->layer_tree_impl());
120 children_.push_back(child.get()); 120 children_.push_back(child.get());
121 layer_tree_impl_->AddLayer(std::move(child)); 121 layer_tree_impl_->AddLayer(std::move(child));
122 } 122 }
123 123
124 std::unique_ptr<LayerImpl> LayerImpl::RemoveChildForTesting(LayerImpl* child) { 124 std::unique_ptr<LayerImpl> LayerImpl::RemoveChildForTesting(LayerImpl* child) {
125 auto it = std::find(children_.begin(), children_.end(), child); 125 auto it = std::find(children_.begin(), children_.end(), child);
126 if (it != children_.end()) 126 if (it != children_.end())
127 children_.erase(it); 127 children_.erase(it);
128 layer_tree_impl()->property_trees()->RemoveIdFromIdToIndexMaps(child->id());
128 return layer_tree_impl_->RemoveLayer(child->id()); 129 return layer_tree_impl_->RemoveLayer(child->id());
129 } 130 }
130 131
131 void LayerImpl::SetParent(LayerImpl* parent) { 132 void LayerImpl::SetParent(LayerImpl* parent) {
132 parent_ = parent; 133 parent_ = parent;
133 } 134 }
134 135
135 void LayerImpl::ClearChildList() { 136 void LayerImpl::ClearChildList() {
136 if (children_.empty()) 137 if (children_.empty())
137 return; 138 return;
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 } 618 }
618 619
619 int LayerImpl::num_copy_requests_in_target_subtree() { 620 int LayerImpl::num_copy_requests_in_target_subtree() {
620 return layer_tree_impl() 621 return layer_tree_impl()
621 ->property_trees() 622 ->property_trees()
622 ->effect_tree.Node(effect_tree_index()) 623 ->effect_tree.Node(effect_tree_index())
623 ->data.num_copy_requests_in_subtree; 624 ->data.num_copy_requests_in_subtree;
624 } 625 }
625 626
626 void LayerImpl::UpdatePropertyTreeTransform() { 627 void LayerImpl::UpdatePropertyTreeTransform() {
627 if (transform_tree_index_ != -1) { 628 PropertyTrees* property_trees = layer_tree_impl()->property_trees();
628 TransformTree& transform_tree = 629 if (property_trees->IsInIdToIndexMap(PropertyTrees::TreeType::TRANSFORM,
629 layer_tree_impl()->property_trees()->transform_tree; 630 id())) {
630 TransformNode* node = transform_tree.Node(transform_tree_index_);
631 // A LayerImpl's own current state is insufficient for determining whether 631 // A LayerImpl's own current state is insufficient for determining whether
632 // it owns a TransformNode, since this depends on the state of the 632 // it owns a TransformNode, since this depends on the state of the
633 // corresponding Layer at the time of the last commit. For example, a 633 // corresponding Layer at the time of the last commit. For example, a
634 // transform animation might have been in progress at the time the last 634 // transform animation might have been in progress at the time the last
635 // commit started, but might have finished since then on the compositor 635 // commit started, but might have finished since then on the compositor
636 // thread. 636 // thread.
637 if (node->owner_id != id()) 637 DCHECK_EQ(transform_tree_index(),
638 return; 638 property_trees->transform_id_to_index_map[id()]);
639 TransformNode* node =
640 property_trees->transform_tree.Node(transform_tree_index());
639 if (node->data.local != transform_) { 641 if (node->data.local != transform_) {
640 node->data.local = transform_; 642 node->data.local = transform_;
641 node->data.needs_local_transform_update = true; 643 node->data.needs_local_transform_update = true;
642 node->data.transform_changed = true; 644 node->data.transform_changed = true;
643 layer_tree_impl()->property_trees()->changed = true; 645 property_trees->changed = true;
644 transform_tree.set_needs_update(true); 646 property_trees->transform_tree.set_needs_update(true);
645 // TODO(ajuma): The current criteria for creating clip nodes means that 647 // TODO(ajuma): The current criteria for creating clip nodes means that
646 // property trees may need to be rebuilt when the new transform isn't 648 // property trees may need to be rebuilt when the new transform isn't
647 // axis-aligned wrt the old transform (see Layer::SetTransform). Since 649 // axis-aligned wrt the old transform (see Layer::SetTransform). Since
648 // rebuilding property trees every frame of a transform animation is 650 // rebuilding property trees every frame of a transform animation is
649 // something we should try to avoid, change property tree-building so that 651 // something we should try to avoid, change property tree-building so that
650 // it doesn't depend on axis aliginment. 652 // it doesn't depend on axis aliginment.
651 } 653 }
652 } 654 }
653 } 655 }
654 656
655 void LayerImpl::UpdatePropertyTreeTransformIsAnimated(bool is_animated) { 657 void LayerImpl::UpdatePropertyTreeTransformIsAnimated(bool is_animated) {
656 if (transform_tree_index_ != -1) { 658 PropertyTrees* property_trees = layer_tree_impl()->property_trees();
657 TransformTree& transform_tree = 659 if (property_trees->IsInIdToIndexMap(PropertyTrees::TreeType::TRANSFORM,
658 layer_tree_impl()->property_trees()->transform_tree; 660 id())) {
659 TransformNode* node = transform_tree.Node(transform_tree_index_); 661 DCHECK_EQ(transform_tree_index(),
662 property_trees->transform_id_to_index_map[id()]);
663 TransformNode* node =
664 property_trees->transform_tree.Node(transform_tree_index());
660 // A LayerImpl's own current state is insufficient for determining whether 665 // A LayerImpl's own current state is insufficient for determining whether
661 // it owns a TransformNode, since this depends on the state of the 666 // it owns a TransformNode, since this depends on the state of the
662 // corresponding Layer at the time of the last commit. For example, if 667 // corresponding Layer at the time of the last commit. For example, if
663 // |is_animated| is false, this might mean a transform animation just ticked 668 // |is_animated| is false, this might mean a transform animation just ticked
664 // past its finish point (so the LayerImpl still owns a TransformNode) or it 669 // past its finish point (so the LayerImpl still owns a TransformNode) or it
665 // might mean that a transform animation was removed during commit or 670 // might mean that a transform animation was removed during commit or
666 // activation (and, in that case, the LayerImpl will no longer own a 671 // activation (and, in that case, the LayerImpl will no longer own a
667 // TransformNode, unless it has non-animation-related reasons for owning a 672 // TransformNode, unless it has non-animation-related reasons for owning a
668 // node). 673 // node).
669 if (node->owner_id != id())
670 return;
671 if (node->data.has_potential_animation != is_animated) { 674 if (node->data.has_potential_animation != is_animated) {
672 node->data.has_potential_animation = is_animated; 675 node->data.has_potential_animation = is_animated;
673 if (is_animated) { 676 if (is_animated) {
674 float maximum_target_scale = 0.f; 677 float maximum_target_scale = 0.f;
675 node->data.local_maximum_animation_target_scale = 678 node->data.local_maximum_animation_target_scale =
676 MaximumTargetScale(&maximum_target_scale) ? maximum_target_scale 679 MaximumTargetScale(&maximum_target_scale) ? maximum_target_scale
677 : 0.f; 680 : 0.f;
678 681
679 float animation_start_scale = 0.f; 682 float animation_start_scale = 0.f;
680 node->data.local_starting_animation_scale = 683 node->data.local_starting_animation_scale =
681 AnimationStartScale(&animation_start_scale) ? animation_start_scale 684 AnimationStartScale(&animation_start_scale) ? animation_start_scale
682 : 0.f; 685 : 0.f;
683 686
684 node->data.has_only_translation_animations = 687 node->data.has_only_translation_animations =
685 HasOnlyTranslationTransforms(); 688 HasOnlyTranslationTransforms();
686 } else { 689 } else {
687 node->data.local_maximum_animation_target_scale = 0.f; 690 node->data.local_maximum_animation_target_scale = 0.f;
688 node->data.local_starting_animation_scale = 0.f; 691 node->data.local_starting_animation_scale = 0.f;
689 node->data.has_only_translation_animations = true; 692 node->data.has_only_translation_animations = true;
690 } 693 }
691 694
692 transform_tree.set_needs_update(true); 695 property_trees->transform_tree.set_needs_update(true);
693 layer_tree_impl()->set_needs_update_draw_properties(); 696 layer_tree_impl()->set_needs_update_draw_properties();
694 } 697 }
695 } 698 }
696 } 699 }
697 700
698 void LayerImpl::UpdatePropertyTreeOpacity() { 701 void LayerImpl::UpdatePropertyTreeOpacity() {
699 if (effect_tree_index_ != -1) { 702 PropertyTrees* property_trees = layer_tree_impl()->property_trees();
700 EffectTree& effect_tree = layer_tree_impl()->property_trees()->effect_tree; 703 if (property_trees->IsInIdToIndexMap(PropertyTrees::TreeType::EFFECT, id())) {
701 if (effect_tree_index_ >= static_cast<int>(effect_tree.size()))
702 return;
703 EffectNode* node = effect_tree.Node(effect_tree_index_);
704 // A LayerImpl's own current state is insufficient for determining whether 704 // A LayerImpl's own current state is insufficient for determining whether
705 // it owns an OpacityNode, since this depends on the state of the 705 // it owns an OpacityNode, since this depends on the state of the
706 // corresponding Layer at the time of the last commit. For example, an 706 // corresponding Layer at the time of the last commit. For example, an
707 // opacity animation might have been in progress at the time the last commit 707 // opacity animation might have been in progress at the time the last commit
708 // started, but might have finished since then on the compositor thread. 708 // started, but might have finished since then on the compositor thread.
709 if (node->owner_id != id() || node->data.opacity == opacity_) 709 DCHECK_EQ(effect_tree_index(),
710 return; 710 property_trees->effect_id_to_index_map[id()]);
711 EffectNode* node = property_trees->effect_tree.Node(effect_tree_index_);
711 node->data.opacity = opacity_; 712 node->data.opacity = opacity_;
712 node->data.effect_changed = true; 713 node->data.effect_changed = true;
713 layer_tree_impl()->property_trees()->changed = true; 714 property_trees->changed = true;
714 effect_tree.set_needs_update(true); 715 property_trees->effect_tree.set_needs_update(true);
715 } 716 }
716 } 717 }
717 718
718 void LayerImpl::UpdatePropertyTreeForScrollingAndAnimationIfNeeded() { 719 void LayerImpl::UpdatePropertyTreeForScrollingAndAnimationIfNeeded() {
719 if (scrollable()) 720 if (scrollable())
720 UpdatePropertyTreeScrollOffset(); 721 UpdatePropertyTreeScrollOffset();
721 722
722 if (HasAnyAnimationTargetingProperty(TargetProperty::TRANSFORM)) { 723 if (HasAnyAnimationTargetingProperty(TargetProperty::TRANSFORM)) {
723 UpdatePropertyTreeTransform(); 724 UpdatePropertyTreeTransform();
724 UpdatePropertyTreeTransformIsAnimated( 725 UpdatePropertyTreeTransformIsAnimated(
725 HasPotentiallyRunningTransformAnimation()); 726 HasPotentiallyRunningTransformAnimation());
726 } 727 }
727 } 728 }
728 729
729 gfx::ScrollOffset LayerImpl::ScrollOffsetForAnimation() const { 730 gfx::ScrollOffset LayerImpl::ScrollOffsetForAnimation() const {
730 return CurrentScrollOffset(); 731 return CurrentScrollOffset();
731 } 732 }
732 733
733 void LayerImpl::OnFilterAnimated(const FilterOperations& filters) { 734 void LayerImpl::OnFilterAnimated(const FilterOperations& filters) {
734 if (filters_ != filters) { 735 if (filters_ != filters) {
735 SetFilters(filters); 736 SetFilters(filters);
736 SetNeedsPushProperties(); 737 SetNeedsPushProperties();
737 layer_tree_impl()->set_needs_update_draw_properties(); 738 layer_tree_impl()->set_needs_update_draw_properties();
738 EffectTree& effect_tree = layer_tree_impl()->property_trees()->effect_tree; 739 EffectTree& effect_tree = layer_tree_impl()->property_trees()->effect_tree;
739 EffectNode* node = effect_tree.Node(effect_tree_index_); 740 EffectNode* node = effect_tree.Node(effect_tree_index_);
740 DCHECK_EQ(node->owner_id, id()); 741 DCHECK(layer_tree_impl()->property_trees()->IsInIdToIndexMap(
742 PropertyTrees::TreeType::EFFECT, id()));
741 node->data.effect_changed = true; 743 node->data.effect_changed = true;
742 layer_tree_impl()->property_trees()->changed = true; 744 layer_tree_impl()->property_trees()->changed = true;
743 effect_tree.set_needs_update(true); 745 effect_tree.set_needs_update(true);
744 } 746 }
745 } 747 }
746 748
747 void LayerImpl::OnOpacityAnimated(float opacity) { 749 void LayerImpl::OnOpacityAnimated(float opacity) {
748 SetOpacity(opacity); 750 SetOpacity(opacity);
749 UpdatePropertyTreeOpacity(); 751 UpdatePropertyTreeOpacity();
750 SetNeedsPushProperties(); 752 SetNeedsPushProperties();
(...skipping 20 matching lines...) Expand all
771 return; 773 return;
772 774
773 SetCurrentScrollOffset(ClampScrollOffsetToLimits(scroll_offset)); 775 SetCurrentScrollOffset(ClampScrollOffsetToLimits(scroll_offset));
774 776
775 layer_tree_impl_->DidAnimateScrollOffset(); 777 layer_tree_impl_->DidAnimateScrollOffset();
776 } 778 }
777 779
778 void LayerImpl::OnTransformIsCurrentlyAnimatingChanged( 780 void LayerImpl::OnTransformIsCurrentlyAnimatingChanged(
779 bool is_currently_animating) { 781 bool is_currently_animating) {
780 DCHECK(layer_tree_impl_); 782 DCHECK(layer_tree_impl_);
781 TransformTree& transform_tree = 783 PropertyTrees* property_trees = layer_tree_impl()->property_trees();
782 layer_tree_impl_->property_trees()->transform_tree; 784 if (!property_trees->IsInIdToIndexMap(PropertyTrees::TreeType::TRANSFORM,
783 TransformNode* node = transform_tree.Node(transform_tree_index()); 785 id()))
784 if (!node)
785 return; 786 return;
786 787 DCHECK_EQ(transform_tree_index(),
787 if (node->owner_id == id()) 788 property_trees->transform_id_to_index_map[id()]);
788 node->data.is_currently_animating = is_currently_animating; 789 TransformNode* node =
790 property_trees->transform_tree.Node(transform_tree_index());
791 node->data.is_currently_animating = is_currently_animating;
789 } 792 }
790 793
791 void LayerImpl::OnTransformIsPotentiallyAnimatingChanged( 794 void LayerImpl::OnTransformIsPotentiallyAnimatingChanged(
792 bool has_potential_animation) { 795 bool has_potential_animation) {
793 UpdatePropertyTreeTransformIsAnimated(has_potential_animation); 796 UpdatePropertyTreeTransformIsAnimated(has_potential_animation);
794 was_ever_ready_since_last_transform_animation_ = false; 797 was_ever_ready_since_last_transform_animation_ = false;
795 } 798 }
796 799
797 void LayerImpl::OnOpacityIsCurrentlyAnimatingChanged( 800 void LayerImpl::OnOpacityIsCurrentlyAnimatingChanged(
798 bool is_currently_animating) { 801 bool is_currently_animating) {
799 DCHECK(layer_tree_impl_); 802 DCHECK(layer_tree_impl_);
800 EffectTree& effect_tree = layer_tree_impl_->property_trees()->effect_tree; 803 PropertyTrees* property_trees = layer_tree_impl()->property_trees();
801 EffectNode* node = effect_tree.Node(effect_tree_index()); 804 if (!property_trees->IsInIdToIndexMap(PropertyTrees::TreeType::EFFECT, id()))
805 return;
806 DCHECK_EQ(effect_tree_index(), property_trees->effect_id_to_index_map[id()]);
807 EffectNode* node = property_trees->effect_tree.Node(effect_tree_index());
802 808
803 if (node->owner_id == id()) 809 node->data.is_currently_animating_opacity = is_currently_animating;
804 node->data.is_currently_animating_opacity = is_currently_animating;
805 } 810 }
806 811
807 void LayerImpl::OnOpacityIsPotentiallyAnimatingChanged( 812 void LayerImpl::OnOpacityIsPotentiallyAnimatingChanged(
808 bool has_potential_animation) { 813 bool has_potential_animation) {
809 DCHECK(layer_tree_impl_); 814 DCHECK(layer_tree_impl_);
810 EffectTree& effect_tree = layer_tree_impl_->property_trees()->effect_tree; 815 PropertyTrees* property_trees = layer_tree_impl()->property_trees();
811 EffectNode* node = effect_tree.Node(effect_tree_index()); 816 if (!property_trees->IsInIdToIndexMap(PropertyTrees::TreeType::EFFECT, id()))
812 if (node->owner_id == id()) { 817 return;
813 node->data.has_potential_opacity_animation = has_potential_animation; 818 DCHECK_EQ(effect_tree_index(), property_trees->effect_id_to_index_map[id()]);
814 effect_tree.set_needs_update(true); 819 EffectNode* node = property_trees->effect_tree.Node(effect_tree_index());
815 } 820 node->data.has_potential_opacity_animation = has_potential_animation;
821 property_trees->effect_tree.set_needs_update(true);
816 } 822 }
817 823
818 bool LayerImpl::IsActive() const { 824 bool LayerImpl::IsActive() const {
819 return layer_tree_impl_->IsActiveTree(); 825 return layer_tree_impl_->IsActiveTree();
820 } 826 }
821 827
822 gfx::Size LayerImpl::bounds() const { 828 gfx::Size LayerImpl::bounds() const {
823 gfx::Vector2d delta = gfx::ToCeiledVector2d(bounds_delta_); 829 gfx::Vector2d delta = gfx::ToCeiledVector2d(bounds_delta_);
824 return gfx::Size(bounds_.width() + delta.x(), 830 return gfx::Size(bounds_.width() + delta.x(),
825 bounds_.height() + delta.y()); 831 bounds_.height() + delta.y());
(...skipping 29 matching lines...) Expand all
855 property_trees->SetOuterViewportContainerBoundsDelta(bounds_delta); 861 property_trees->SetOuterViewportContainerBoundsDelta(bounds_delta);
856 else if (this == layer_tree_impl()->InnerViewportScrollLayer()) 862 else if (this == layer_tree_impl()->InnerViewportScrollLayer())
857 property_trees->SetInnerViewportScrollBoundsDelta(bounds_delta); 863 property_trees->SetInnerViewportScrollBoundsDelta(bounds_delta);
858 864
859 layer_tree_impl()->DidUpdateScrollState(id()); 865 layer_tree_impl()->DidUpdateScrollState(id());
860 866
861 if (masks_to_bounds()) { 867 if (masks_to_bounds()) {
862 // If layer is clipping, then update the clip node using the new bounds. 868 // If layer is clipping, then update the clip node using the new bounds.
863 ClipNode* clip_node = property_trees->clip_tree.Node(clip_tree_index()); 869 ClipNode* clip_node = property_trees->clip_tree.Node(clip_tree_index());
864 if (clip_node) { 870 if (clip_node) {
865 DCHECK(id() == clip_node->owner_id); 871 DCHECK(property_trees->IsInIdToIndexMap(PropertyTrees::TreeType::CLIP,
872 id()));
866 clip_node->data.clip = gfx::RectF( 873 clip_node->data.clip = gfx::RectF(
867 gfx::PointF() + offset_to_transform_parent(), gfx::SizeF(bounds())); 874 gfx::PointF() + offset_to_transform_parent(), gfx::SizeF(bounds()));
868 property_trees->clip_tree.set_needs_update(true); 875 property_trees->clip_tree.set_needs_update(true);
869 } 876 }
870 property_trees->full_tree_damaged = true; 877 property_trees->full_tree_damaged = true;
871 layer_tree_impl()->set_needs_update_draw_properties(); 878 layer_tree_impl()->set_needs_update_draw_properties();
872 } else { 879 } else {
873 NoteLayerPropertyChanged(); 880 NoteLayerPropertyChanged();
874 } 881 }
875 } 882 }
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 } 1148 }
1142 1149
1143 gfx::ScrollOffset LayerImpl::CurrentScrollOffset() const { 1150 gfx::ScrollOffset LayerImpl::CurrentScrollOffset() const {
1144 return layer_tree_impl()->property_trees()->scroll_tree.current_scroll_offset( 1151 return layer_tree_impl()->property_trees()->scroll_tree.current_scroll_offset(
1145 id()); 1152 id());
1146 } 1153 }
1147 1154
1148 void LayerImpl::UpdatePropertyTreeScrollOffset() { 1155 void LayerImpl::UpdatePropertyTreeScrollOffset() {
1149 // TODO(enne): in the future, scrolling should update the scroll tree 1156 // TODO(enne): in the future, scrolling should update the scroll tree
1150 // directly instead of going through layers. 1157 // directly instead of going through layers.
1151 if (transform_tree_index_ != -1) { 1158 TransformTree& transform_tree =
1152 TransformTree& transform_tree = 1159 layer_tree_impl()->property_trees()->transform_tree;
1153 layer_tree_impl()->property_trees()->transform_tree; 1160 TransformNode* node = transform_tree.Node(transform_tree_index_);
1154 TransformNode* node = transform_tree.Node(transform_tree_index_); 1161 gfx::ScrollOffset current_offset = CurrentScrollOffset();
1155 gfx::ScrollOffset current_offset = CurrentScrollOffset(); 1162 if (node->data.scroll_offset != current_offset) {
1156 if (node->data.scroll_offset != current_offset) { 1163 node->data.scroll_offset = current_offset;
1157 node->data.scroll_offset = current_offset; 1164 node->data.needs_local_transform_update = true;
1158 node->data.needs_local_transform_update = true; 1165 transform_tree.set_needs_update(true);
1159 transform_tree.set_needs_update(true);
1160 }
1161 } 1166 }
1162 } 1167 }
1163 1168
1164 SimpleEnclosedRegion LayerImpl::VisibleOpaqueRegion() const { 1169 SimpleEnclosedRegion LayerImpl::VisibleOpaqueRegion() const {
1165 if (contents_opaque()) 1170 if (contents_opaque())
1166 return SimpleEnclosedRegion(visible_layer_rect()); 1171 return SimpleEnclosedRegion(visible_layer_rect());
1167 return SimpleEnclosedRegion(); 1172 return SimpleEnclosedRegion();
1168 } 1173 }
1169 1174
1170 void LayerImpl::DidBeginTracing() {} 1175 void LayerImpl::DidBeginTracing() {}
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1414 .layer_transforms_should_scale_layer_contents) { 1419 .layer_transforms_should_scale_layer_contents) {
1415 return default_scale; 1420 return default_scale;
1416 } 1421 }
1417 1422
1418 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( 1423 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents(
1419 DrawTransform(), default_scale); 1424 DrawTransform(), default_scale);
1420 return std::max(transform_scales.x(), transform_scales.y()); 1425 return std::max(transform_scales.x(), transform_scales.y());
1421 } 1426 }
1422 1427
1423 } // namespace cc 1428 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/trees/property_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698