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

Side by Side Diff: ui/compositor/layer.cc

Issue 2776973004: Remove CompositorObserver::OnCompositingEnded() (Closed)
Patch Set: Rename commited_frame_number_ to activated_frame_count_ and move increments back to DidReceiveCompo… Created 3 years, 8 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 | « ui/compositor/compositor_unittest.cc ('k') | ui/compositor/layer_unittest.cc » ('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 (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
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
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
OLDNEW
« no previous file with comments | « ui/compositor/compositor_unittest.cc ('k') | ui/compositor/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698