| 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 2288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2299 decoded_image_tracker_.QueueImageDecode( | 2299 decoded_image_tracker_.QueueImageDecode( |
| 2300 std::move(image), base::Bind(&LayerTreeHostImpl::ImageDecodeFinished, | 2300 std::move(image), base::Bind(&LayerTreeHostImpl::ImageDecodeFinished, |
| 2301 base::Unretained(this), embedder_callback)); | 2301 base::Unretained(this), embedder_callback)); |
| 2302 } | 2302 } |
| 2303 | 2303 |
| 2304 void LayerTreeHostImpl::ImageDecodeFinished( | 2304 void LayerTreeHostImpl::ImageDecodeFinished( |
| 2305 const base::Callback<void(bool)>& embedder_callback, | 2305 const base::Callback<void(bool)>& embedder_callback, |
| 2306 bool decode_succeeded) { | 2306 bool decode_succeeded) { |
| 2307 completed_image_decode_callbacks_.emplace_back( | 2307 completed_image_decode_callbacks_.emplace_back( |
| 2308 base::Bind(embedder_callback, decode_succeeded)); | 2308 base::Bind(embedder_callback, decode_succeeded)); |
| 2309 client_->SetNeedsCommitOnImplThread(); | 2309 client_->NotifyImageDecodeRequestFinished(); |
| 2310 } | 2310 } |
| 2311 | 2311 |
| 2312 std::vector<base::Closure> | 2312 std::vector<base::Closure> |
| 2313 LayerTreeHostImpl::TakeCompletedImageDecodeCallbacks() { | 2313 LayerTreeHostImpl::TakeCompletedImageDecodeCallbacks() { |
| 2314 auto result = std::move(completed_image_decode_callbacks_); | 2314 auto result = std::move(completed_image_decode_callbacks_); |
| 2315 completed_image_decode_callbacks_.clear(); | 2315 completed_image_decode_callbacks_.clear(); |
| 2316 return result; | 2316 return result; |
| 2317 } | 2317 } |
| 2318 | 2318 |
| 2319 void LayerTreeHostImpl::DidChangeScrollbarVisibility() { | 2319 void LayerTreeHostImpl::DidChangeScrollbarVisibility() { |
| (...skipping 1866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4186 worker_context_visibility_ = | 4186 worker_context_visibility_ = |
| 4187 worker_context->CacheController()->ClientBecameVisible(); | 4187 worker_context->CacheController()->ClientBecameVisible(); |
| 4188 } else { | 4188 } else { |
| 4189 worker_context->CacheController()->ClientBecameNotVisible( | 4189 worker_context->CacheController()->ClientBecameNotVisible( |
| 4190 std::move(worker_context_visibility_)); | 4190 std::move(worker_context_visibility_)); |
| 4191 } | 4191 } |
| 4192 } | 4192 } |
| 4193 } | 4193 } |
| 4194 | 4194 |
| 4195 } // namespace cc | 4195 } // namespace cc |
| OLD | NEW |