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 #include <memory> | 8 #include <memory> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1077 return device_scale_factor_; | 1077 return device_scale_factor_; |
1078 } | 1078 } |
1079 | 1079 |
1080 LayerAnimatorCollection* Layer::GetLayerAnimatorCollection() { | 1080 LayerAnimatorCollection* Layer::GetLayerAnimatorCollection() { |
1081 Compositor* compositor = GetCompositor(); | 1081 Compositor* compositor = GetCompositor(); |
1082 return compositor ? compositor->layer_animator_collection() : NULL; | 1082 return compositor ? compositor->layer_animator_collection() : NULL; |
1083 } | 1083 } |
1084 | 1084 |
1085 int Layer::GetFrameNumber() const { | 1085 int Layer::GetFrameNumber() const { |
1086 const Compositor* compositor = GetCompositor(); | 1086 const Compositor* compositor = GetCompositor(); |
1087 return compositor ? compositor->committed_frame_number() : 0; | 1087 return compositor ? compositor->activated_frame_count() : 0; |
1088 } | 1088 } |
1089 | 1089 |
1090 float Layer::GetRefreshRate() const { | 1090 float Layer::GetRefreshRate() const { |
1091 const Compositor* compositor = GetCompositor(); | 1091 const Compositor* compositor = GetCompositor(); |
1092 return compositor ? compositor->refresh_rate() : 60.0; | 1092 return compositor ? compositor->refresh_rate() : 60.0; |
1093 } | 1093 } |
1094 | 1094 |
1095 cc::Layer* Layer::GetCcLayer() const { | 1095 cc::Layer* Layer::GetCcLayer() const { |
1096 return cc_layer_; | 1096 return cc_layer_; |
1097 } | 1097 } |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1176 const auto it = std::find_if(mirrors_.begin(), mirrors_.end(), | 1176 const auto it = std::find_if(mirrors_.begin(), mirrors_.end(), |
1177 [mirror](const std::unique_ptr<LayerMirror>& mirror_ptr) { | 1177 [mirror](const std::unique_ptr<LayerMirror>& mirror_ptr) { |
1178 return mirror_ptr.get() == mirror; | 1178 return mirror_ptr.get() == mirror; |
1179 }); | 1179 }); |
1180 | 1180 |
1181 DCHECK(it != mirrors_.end()); | 1181 DCHECK(it != mirrors_.end()); |
1182 mirrors_.erase(it); | 1182 mirrors_.erase(it); |
1183 } | 1183 } |
1184 | 1184 |
1185 } // namespace ui | 1185 } // namespace ui |
OLD | NEW |