| 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_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 3317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3328 client_->SetNeedsCommitOnImplThread(); | 3328 client_->SetNeedsCommitOnImplThread(); |
| 3329 // When a pinch ends, we may be displaying content cached at incorrect scales, | 3329 // When a pinch ends, we may be displaying content cached at incorrect scales, |
| 3330 // so updating draw properties and drawing will ensure we are using the right | 3330 // so updating draw properties and drawing will ensure we are using the right |
| 3331 // scales that we want when we're not inside a pinch. | 3331 // scales that we want when we're not inside a pinch. |
| 3332 active_tree_->set_needs_update_draw_properties(); | 3332 active_tree_->set_needs_update_draw_properties(); |
| 3333 SetNeedsRedraw(); | 3333 SetNeedsRedraw(); |
| 3334 } | 3334 } |
| 3335 | 3335 |
| 3336 std::unique_ptr<BeginFrameCallbackList> | 3336 std::unique_ptr<BeginFrameCallbackList> |
| 3337 LayerTreeHostImpl::ProcessLayerTreeMutations() { | 3337 LayerTreeHostImpl::ProcessLayerTreeMutations() { |
| 3338 auto callbacks = make_scoped_ptr(new BeginFrameCallbackList()); | 3338 std::unique_ptr<BeginFrameCallbackList> callbacks(new BeginFrameCallbackList); |
| 3339 if (mutator_) { | 3339 if (mutator_) { |
| 3340 const base::Closure& callback = mutator_->TakeMutations(); | 3340 const base::Closure& callback = mutator_->TakeMutations(); |
| 3341 if (!callback.is_null()) | 3341 if (!callback.is_null()) |
| 3342 callbacks->push_back(callback); | 3342 callbacks->push_back(callback); |
| 3343 } | 3343 } |
| 3344 return callbacks; | 3344 return callbacks; |
| 3345 } | 3345 } |
| 3346 | 3346 |
| 3347 static void CollectScrollDeltas(ScrollAndScaleSet* scroll_info, | 3347 static void CollectScrollDeltas(ScrollAndScaleSet* scroll_info, |
| 3348 LayerImpl* root_layer) { | 3348 LayerImpl* root_layer) { |
| (...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3976 return task_runner_provider_->HasImplThread(); | 3976 return task_runner_provider_->HasImplThread(); |
| 3977 } | 3977 } |
| 3978 | 3978 |
| 3979 bool LayerTreeHostImpl::CommitToActiveTree() const { | 3979 bool LayerTreeHostImpl::CommitToActiveTree() const { |
| 3980 // In single threaded mode we skip the pending tree and commit directly to the | 3980 // In single threaded mode we skip the pending tree and commit directly to the |
| 3981 // active tree. | 3981 // active tree. |
| 3982 return !task_runner_provider_->HasImplThread(); | 3982 return !task_runner_provider_->HasImplThread(); |
| 3983 } | 3983 } |
| 3984 | 3984 |
| 3985 } // namespace cc | 3985 } // namespace cc |
| OLD | NEW |