OLD | NEW |
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 "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "cc/animation/animation_registrar.h" | 10 #include "cc/animation/animation_registrar.h" |
(...skipping 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1278 } | 1278 } |
1279 | 1279 |
1280 layer_tree_impl()->set_needs_update_draw_properties(); | 1280 layer_tree_impl()->set_needs_update_draw_properties(); |
1281 // TODO(wjmaclean) Should the rest of this function be deleted? | 1281 // TODO(wjmaclean) Should the rest of this function be deleted? |
1282 // TODO(wjmaclean) The scrollbar animator for the pinch-zoom scrollbars should | 1282 // TODO(wjmaclean) The scrollbar animator for the pinch-zoom scrollbars should |
1283 // activate for every scroll on the main frame, not just the scrolls that move | 1283 // activate for every scroll on the main frame, not just the scrolls that move |
1284 // the pinch virtual viewport (i.e. trigger from either inner or outer | 1284 // the pinch virtual viewport (i.e. trigger from either inner or outer |
1285 // viewport). | 1285 // viewport). |
1286 if (scrollbar_animation_controller_) { | 1286 if (scrollbar_animation_controller_) { |
1287 bool should_animate = scrollbar_animation_controller_->DidScrollUpdate( | 1287 bool should_animate = scrollbar_animation_controller_->DidScrollUpdate( |
1288 layer_tree_impl_->CurrentPhysicalTimeTicks()); | 1288 layer_tree_impl_->CurrentFrameTimeTicks()); |
1289 if (should_animate) | 1289 if (should_animate) |
1290 layer_tree_impl_->StartScrollbarAnimation(); | 1290 layer_tree_impl_->StartScrollbarAnimation(); |
1291 } | 1291 } |
1292 } | 1292 } |
1293 | 1293 |
1294 void LayerImpl::DidBecomeActive() { | 1294 void LayerImpl::DidBecomeActive() { |
1295 if (layer_tree_impl_->settings().scrollbar_animator == | 1295 if (layer_tree_impl_->settings().scrollbar_animator == |
1296 LayerTreeSettings::NoAnimator) { | 1296 LayerTreeSettings::NoAnimator) { |
1297 return; | 1297 return; |
1298 } | 1298 } |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1490 scoped_ptr<base::Value> LayerImpl::AsValue() const { | 1490 scoped_ptr<base::Value> LayerImpl::AsValue() const { |
1491 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); | 1491 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); |
1492 AsValueInto(state.get()); | 1492 AsValueInto(state.get()); |
1493 return state.PassAs<base::Value>(); | 1493 return state.PassAs<base::Value>(); |
1494 } | 1494 } |
1495 | 1495 |
1496 void LayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) { | 1496 void LayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) { |
1497 benchmark->RunOnLayer(this); | 1497 benchmark->RunOnLayer(this); |
1498 } | 1498 } |
1499 } // namespace cc | 1499 } // namespace cc |
OLD | NEW |