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 2326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2337 client_->SetNeedsCommitOnImplThread(); | 2337 client_->SetNeedsCommitOnImplThread(); |
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::ClearImageCacheOnNavigation() { |
| 2348 if (image_decode_cache_) |
| 2349 image_decode_cache_->ClearCache(); |
| 2350 } |
| 2351 |
2347 void LayerTreeHostImpl::DidChangeScrollbarVisibility() { | 2352 void LayerTreeHostImpl::DidChangeScrollbarVisibility() { |
2348 // Need a commit since input handling for scrollbars is handled in Blink so | 2353 // Need a commit since input handling for scrollbars is handled in Blink so |
2349 // we need to communicate to Blink when the compositor shows/hides the | 2354 // we need to communicate to Blink when the compositor shows/hides the |
2350 // scrollbars. | 2355 // scrollbars. |
2351 client_->SetNeedsCommitOnImplThread(); | 2356 client_->SetNeedsCommitOnImplThread(); |
2352 } | 2357 } |
2353 | 2358 |
2354 void LayerTreeHostImpl::CleanUpTileManagerAndUIResources() { | 2359 void LayerTreeHostImpl::CleanUpTileManagerAndUIResources() { |
2355 ClearUIResources(); | 2360 ClearUIResources(); |
2356 tile_manager_.FinishTasksAndCleanUp(); | 2361 tile_manager_.FinishTasksAndCleanUp(); |
(...skipping 1914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4271 } | 4276 } |
4272 | 4277 |
4273 void LayerTreeHostImpl::UpdateScrollSourceInfo(bool is_wheel_scroll) { | 4278 void LayerTreeHostImpl::UpdateScrollSourceInfo(bool is_wheel_scroll) { |
4274 if (is_wheel_scroll) | 4279 if (is_wheel_scroll) |
4275 has_scrolled_by_wheel_ = true; | 4280 has_scrolled_by_wheel_ = true; |
4276 else | 4281 else |
4277 has_scrolled_by_touch_ = true; | 4282 has_scrolled_by_touch_ = true; |
4278 } | 4283 } |
4279 | 4284 |
4280 } // namespace cc | 4285 } // namespace cc |
OLD | NEW |