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 2362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2373 decoded_image_tracker_.QueueImageDecode( | 2373 decoded_image_tracker_.QueueImageDecode( |
2374 std::move(image), base::Bind(&LayerTreeHostImpl::ImageDecodeFinished, | 2374 std::move(image), base::Bind(&LayerTreeHostImpl::ImageDecodeFinished, |
2375 base::Unretained(this), embedder_callback)); | 2375 base::Unretained(this), embedder_callback)); |
2376 } | 2376 } |
2377 | 2377 |
2378 void LayerTreeHostImpl::ImageDecodeFinished( | 2378 void LayerTreeHostImpl::ImageDecodeFinished( |
2379 const base::Callback<void(bool)>& embedder_callback, | 2379 const base::Callback<void(bool)>& embedder_callback, |
2380 bool decode_succeeded) { | 2380 bool decode_succeeded) { |
2381 completed_image_decode_callbacks_.emplace_back( | 2381 completed_image_decode_callbacks_.emplace_back( |
2382 base::Bind(embedder_callback, decode_succeeded)); | 2382 base::Bind(embedder_callback, decode_succeeded)); |
2383 client_->SetNeedsCommitOnImplThread(); | 2383 client_->NotifyImageDecodeRequestFinished(); |
2384 } | 2384 } |
2385 | 2385 |
2386 std::vector<base::Closure> | 2386 std::vector<base::Closure> |
2387 LayerTreeHostImpl::TakeCompletedImageDecodeCallbacks() { | 2387 LayerTreeHostImpl::TakeCompletedImageDecodeCallbacks() { |
2388 auto result = std::move(completed_image_decode_callbacks_); | 2388 auto result = std::move(completed_image_decode_callbacks_); |
2389 completed_image_decode_callbacks_.clear(); | 2389 completed_image_decode_callbacks_.clear(); |
2390 return result; | 2390 return result; |
2391 } | 2391 } |
2392 | 2392 |
2393 void LayerTreeHostImpl::ClearImageCacheOnNavigation() { | 2393 void LayerTreeHostImpl::ClearImageCacheOnNavigation() { |
(...skipping 1895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4289 | 4289 |
4290 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) { | 4290 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) { |
4291 if (!element_id) | 4291 if (!element_id) |
4292 return; | 4292 return; |
4293 if (ScrollbarAnimationController* animation_controller = | 4293 if (ScrollbarAnimationController* animation_controller = |
4294 ScrollbarAnimationControllerForElementId(element_id)) | 4294 ScrollbarAnimationControllerForElementId(element_id)) |
4295 animation_controller->DidScrollUpdate(); | 4295 animation_controller->DidScrollUpdate(); |
4296 } | 4296 } |
4297 | 4297 |
4298 } // namespace cc | 4298 } // namespace cc |
OLD | NEW |