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

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

Issue 2929493002: Plumb PaintImage for the img.decode instead of SkImage. (Closed)
Patch Set: 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.h ('k') | cc/trees/layer_tree_host_impl.h » ('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.h" 5 #include "cc/trees/layer_tree_host.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 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after
1406 } 1406 }
1407 1407
1408 gfx::ScrollOffset LayerTreeHost::GetScrollOffsetForAnimation( 1408 gfx::ScrollOffset LayerTreeHost::GetScrollOffsetForAnimation(
1409 ElementId element_id) const { 1409 ElementId element_id) const {
1410 Layer* layer = LayerByElementId(element_id); 1410 Layer* layer = LayerByElementId(element_id);
1411 DCHECK(layer); 1411 DCHECK(layer);
1412 return layer->ScrollOffsetForAnimation(); 1412 return layer->ScrollOffsetForAnimation();
1413 } 1413 }
1414 1414
1415 void LayerTreeHost::QueueImageDecode( 1415 void LayerTreeHost::QueueImageDecode(
1416 sk_sp<const SkImage> image, 1416 const PaintImage& image,
1417 const base::Callback<void(bool)>& callback) { 1417 const base::Callback<void(bool)>& callback) {
1418 TRACE_EVENT0("cc", "LayerTreeHost::QueueImageDecode"); 1418 TRACE_EVENT0("cc", "LayerTreeHost::QueueImageDecode");
1419 queued_image_decodes_.emplace_back(std::move(image), callback); 1419 queued_image_decodes_.emplace_back(image, callback);
1420 SetNeedsCommit(); 1420 SetNeedsCommit();
1421 } 1421 }
1422 1422
1423 LayerListIterator<Layer> LayerTreeHost::begin() const { 1423 LayerListIterator<Layer> LayerTreeHost::begin() const {
1424 return LayerListIterator<Layer>(root_layer_.get()); 1424 return LayerListIterator<Layer>(root_layer_.get());
1425 } 1425 }
1426 1426
1427 LayerListIterator<Layer> LayerTreeHost::end() const { 1427 LayerListIterator<Layer> LayerTreeHost::end() const {
1428 return LayerListIterator<Layer>(nullptr); 1428 return LayerListIterator<Layer>(nullptr);
1429 } 1429 }
1430 1430
1431 LayerListReverseIterator<Layer> LayerTreeHost::rbegin() { 1431 LayerListReverseIterator<Layer> LayerTreeHost::rbegin() {
1432 return LayerListReverseIterator<Layer>(root_layer_.get()); 1432 return LayerListReverseIterator<Layer>(root_layer_.get());
1433 } 1433 }
1434 1434
1435 LayerListReverseIterator<Layer> LayerTreeHost::rend() { 1435 LayerListReverseIterator<Layer> LayerTreeHost::rend() {
1436 return LayerListReverseIterator<Layer>(nullptr); 1436 return LayerListReverseIterator<Layer>(nullptr);
1437 } 1437 }
1438 1438
1439 void LayerTreeHost::SetNeedsDisplayOnAllLayers() { 1439 void LayerTreeHost::SetNeedsDisplayOnAllLayers() {
1440 for (auto* layer : *this) 1440 for (auto* layer : *this)
1441 layer->SetNeedsDisplay(); 1441 layer->SetNeedsDisplay();
1442 } 1442 }
1443 1443
1444 void LayerTreeHost::SetHasCopyRequest(bool has_copy_request) { 1444 void LayerTreeHost::SetHasCopyRequest(bool has_copy_request) {
1445 has_copy_request_ = has_copy_request; 1445 has_copy_request_ = has_copy_request;
1446 } 1446 }
1447 1447
1448 } // namespace cc 1448 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698