Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(487)

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 2769823002: Add decode() functionality to image elements. (Closed)
Patch Set: rebase Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698