OLD | NEW |
---|---|
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <stack> | 8 #include <stack> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1069 outer_viewport_scroll_delta); | 1069 outer_viewport_scroll_delta); |
1070 } | 1070 } |
1071 ApplyPageScaleDeltaFromImplSide(info.page_scale_delta); | 1071 ApplyPageScaleDeltaFromImplSide(info.page_scale_delta); |
1072 | 1072 |
1073 client_->ApplyScrollAndScale( | 1073 client_->ApplyScrollAndScale( |
1074 inner_viewport_scroll_delta + outer_viewport_scroll_delta, | 1074 inner_viewport_scroll_delta + outer_viewport_scroll_delta, |
1075 info.page_scale_delta); | 1075 info.page_scale_delta); |
1076 } | 1076 } |
1077 } | 1077 } |
1078 | 1078 |
1079 void LayerTreeHost::RecordDrawTiming(const DrawTimingSet& info) { | |
1080 if (!root_layer_.get()) | |
1081 return; | |
1082 | |
1083 for (size_t i = 0; i < info.draws.size(); ++i) { | |
1084 client_->RecordDrawTiming(info.draws[i].rect_id, info.draws[i].timestamps); | |
enne (OOO)
2014/07/22 20:44:25
Can you help me understand what the eventual API i
Mike B
2014/07/25 23:09:40
Both.. but timestamp is the main thing being deliv
| |
1085 } | |
1086 } | |
1087 | |
1079 void LayerTreeHost::StartRateLimiter() { | 1088 void LayerTreeHost::StartRateLimiter() { |
1080 if (animating_) | 1089 if (animating_) |
1081 return; | 1090 return; |
1082 | 1091 |
1083 if (!rate_limit_timer_.IsRunning()) { | 1092 if (!rate_limit_timer_.IsRunning()) { |
1084 rate_limit_timer_.Start(FROM_HERE, | 1093 rate_limit_timer_.Start(FROM_HERE, |
1085 base::TimeDelta(), | 1094 base::TimeDelta(), |
1086 this, | 1095 this, |
1087 &LayerTreeHost::RateLimit); | 1096 &LayerTreeHost::RateLimit); |
1088 } | 1097 } |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1282 swap_promise_list_.push_back(swap_promise.Pass()); | 1291 swap_promise_list_.push_back(swap_promise.Pass()); |
1283 } | 1292 } |
1284 | 1293 |
1285 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { | 1294 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { |
1286 for (size_t i = 0; i < swap_promise_list_.size(); i++) | 1295 for (size_t i = 0; i < swap_promise_list_.size(); i++) |
1287 swap_promise_list_[i]->DidNotSwap(reason); | 1296 swap_promise_list_[i]->DidNotSwap(reason); |
1288 swap_promise_list_.clear(); | 1297 swap_promise_list_.clear(); |
1289 } | 1298 } |
1290 | 1299 |
1291 } // namespace cc | 1300 } // namespace cc |
OLD | NEW |