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

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

Issue 2769823002: Add decode() functionality to image elements. (Closed)
Patch Set: rebase+review Created 3 years, 8 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
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 2299 matching lines...) Expand 10 before | Expand all | Expand 10 after
2310 decoded_image_tracker_.QueueImageDecode( 2310 decoded_image_tracker_.QueueImageDecode(
2311 std::move(image), base::Bind(&LayerTreeHostImpl::ImageDecodeFinished, 2311 std::move(image), base::Bind(&LayerTreeHostImpl::ImageDecodeFinished,
2312 base::Unretained(this), embedder_callback)); 2312 base::Unretained(this), embedder_callback));
2313 } 2313 }
2314 2314
2315 void LayerTreeHostImpl::ImageDecodeFinished( 2315 void LayerTreeHostImpl::ImageDecodeFinished(
2316 const base::Callback<void(bool)>& embedder_callback, 2316 const base::Callback<void(bool)>& embedder_callback,
2317 bool decode_succeeded) { 2317 bool decode_succeeded) {
2318 completed_image_decode_callbacks_.emplace_back( 2318 completed_image_decode_callbacks_.emplace_back(
2319 base::Bind(embedder_callback, decode_succeeded)); 2319 base::Bind(embedder_callback, decode_succeeded));
2320 client_->SetNeedsCommitOnImplThread(); 2320 client_->NotifyImageDecodeRequestFinished();
2321 } 2321 }
2322 2322
2323 std::vector<base::Closure> 2323 std::vector<base::Closure>
2324 LayerTreeHostImpl::TakeCompletedImageDecodeCallbacks() { 2324 LayerTreeHostImpl::TakeCompletedImageDecodeCallbacks() {
2325 auto result = std::move(completed_image_decode_callbacks_); 2325 auto result = std::move(completed_image_decode_callbacks_);
2326 completed_image_decode_callbacks_.clear(); 2326 completed_image_decode_callbacks_.clear();
2327 return result; 2327 return result;
2328 } 2328 }
2329 2329
2330 void LayerTreeHostImpl::DidChangeScrollbarVisibility() { 2330 void LayerTreeHostImpl::DidChangeScrollbarVisibility() {
(...skipping 1923 matching lines...) Expand 10 before | Expand all | Expand 10 after
4254 } 4254 }
4255 4255
4256 void LayerTreeHostImpl::UpdateScrollSourceInfo(bool is_wheel_scroll) { 4256 void LayerTreeHostImpl::UpdateScrollSourceInfo(bool is_wheel_scroll) {
4257 if (is_wheel_scroll) 4257 if (is_wheel_scroll)
4258 has_scrolled_by_wheel_ = true; 4258 has_scrolled_by_wheel_ = true;
4259 else 4259 else
4260 has_scrolled_by_touch_ = true; 4260 has_scrolled_by_touch_ = true;
4261 } 4261 }
4262 4262
4263 } // namespace cc 4263 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698