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