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 2316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2327 decoded_image_tracker_.QueueImageDecode( | 2327 decoded_image_tracker_.QueueImageDecode( |
2328 std::move(image), base::Bind(&LayerTreeHostImpl::ImageDecodeFinished, | 2328 std::move(image), base::Bind(&LayerTreeHostImpl::ImageDecodeFinished, |
2329 base::Unretained(this), embedder_callback)); | 2329 base::Unretained(this), embedder_callback)); |
2330 } | 2330 } |
2331 | 2331 |
2332 void LayerTreeHostImpl::ImageDecodeFinished( | 2332 void LayerTreeHostImpl::ImageDecodeFinished( |
2333 const base::Callback<void(bool)>& embedder_callback, | 2333 const base::Callback<void(bool)>& embedder_callback, |
2334 bool decode_succeeded) { | 2334 bool decode_succeeded) { |
2335 completed_image_decode_callbacks_.emplace_back( | 2335 completed_image_decode_callbacks_.emplace_back( |
2336 base::Bind(embedder_callback, decode_succeeded)); | 2336 base::Bind(embedder_callback, decode_succeeded)); |
2337 client_->SetNeedsCommitOnImplThread(); | 2337 client_->NotifyImageDecodeRequestFinished(); |
2338 } | 2338 } |
2339 | 2339 |
2340 std::vector<base::Closure> | 2340 std::vector<base::Closure> |
2341 LayerTreeHostImpl::TakeCompletedImageDecodeCallbacks() { | 2341 LayerTreeHostImpl::TakeCompletedImageDecodeCallbacks() { |
2342 auto result = std::move(completed_image_decode_callbacks_); | 2342 auto result = std::move(completed_image_decode_callbacks_); |
2343 completed_image_decode_callbacks_.clear(); | 2343 completed_image_decode_callbacks_.clear(); |
2344 return result; | 2344 return result; |
2345 } | 2345 } |
2346 | 2346 |
2347 void LayerTreeHostImpl::DidChangeScrollbarVisibility() { | 2347 void LayerTreeHostImpl::DidChangeScrollbarVisibility() { |
(...skipping 1923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4271 } | 4271 } |
4272 | 4272 |
4273 void LayerTreeHostImpl::UpdateScrollSourceInfo(bool is_wheel_scroll) { | 4273 void LayerTreeHostImpl::UpdateScrollSourceInfo(bool is_wheel_scroll) { |
4274 if (is_wheel_scroll) | 4274 if (is_wheel_scroll) |
4275 has_scrolled_by_wheel_ = true; | 4275 has_scrolled_by_wheel_ = true; |
4276 else | 4276 else |
4277 has_scrolled_by_touch_ = true; | 4277 has_scrolled_by_touch_ = true; |
4278 } | 4278 } |
4279 | 4279 |
4280 } // namespace cc | 4280 } // namespace cc |
OLD | NEW |