OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "ui/compositor/layer.h" | 5 #include "ui/compositor/layer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
852 } | 852 } |
853 | 853 |
854 void Layer::RemoveThreadedAnimation(int animation_id) { | 854 void Layer::RemoveThreadedAnimation(int animation_id) { |
855 DCHECK(cc_layer_); | 855 DCHECK(cc_layer_); |
856 if (pending_threaded_animations_.size() == 0) { | 856 if (pending_threaded_animations_.size() == 0) { |
857 cc_layer_->RemoveAnimation(animation_id); | 857 cc_layer_->RemoveAnimation(animation_id); |
858 return; | 858 return; |
859 } | 859 } |
860 | 860 |
861 pending_threaded_animations_.erase( | 861 pending_threaded_animations_.erase( |
862 cc::remove_if(pending_threaded_animations_, | 862 cc::remove_if(&pending_threaded_animations_, |
863 pending_threaded_animations_.begin(), | 863 pending_threaded_animations_.begin(), |
864 pending_threaded_animations_.end(), | 864 pending_threaded_animations_.end(), |
865 HasAnimationId(animation_id)), | 865 HasAnimationId(animation_id)), |
866 pending_threaded_animations_.end()); | 866 pending_threaded_animations_.end()); |
867 } | 867 } |
868 | 868 |
869 void Layer::SendPendingThreadedAnimations() { | 869 void Layer::SendPendingThreadedAnimations() { |
870 for (cc::ScopedPtrVector<cc::Animation>::iterator it = | 870 for (cc::ScopedPtrVector<cc::Animation>::iterator it = |
871 pending_threaded_animations_.begin(); | 871 pending_threaded_animations_.begin(); |
872 it != pending_threaded_animations_.end(); | 872 it != pending_threaded_animations_.end(); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
926 texture_layer_->SetUV(uv_top_left, uv_bottom_right); | 926 texture_layer_->SetUV(uv_top_left, uv_bottom_right); |
927 } else if (delegated_renderer_layer_.get()) { | 927 } else if (delegated_renderer_layer_.get()) { |
928 delegated_renderer_layer_->SetDisplaySize( | 928 delegated_renderer_layer_->SetDisplaySize( |
929 ConvertSizeToPixel(this, delegated_frame_size_in_dip_)); | 929 ConvertSizeToPixel(this, delegated_frame_size_in_dip_)); |
930 size.ClampToMax(delegated_frame_size_in_dip_); | 930 size.ClampToMax(delegated_frame_size_in_dip_); |
931 } | 931 } |
932 cc_layer_->SetBounds(ConvertSizeToPixel(this, size)); | 932 cc_layer_->SetBounds(ConvertSizeToPixel(this, size)); |
933 } | 933 } |
934 | 934 |
935 } // namespace ui | 935 } // namespace ui |
OLD | NEW |