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

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

Issue 2110683004: cc: Move filters to the effect tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 4 years, 5 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_common.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.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 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after
1460 layer->OnOpacityIsCurrentlyAnimatingChanged(is_animating); 1460 layer->OnOpacityIsCurrentlyAnimatingChanged(is_animating);
1461 break; 1461 break;
1462 case AnimationChangeType::BOTH: 1462 case AnimationChangeType::BOTH:
1463 layer->OnOpacityIsPotentiallyAnimatingChanged(is_animating); 1463 layer->OnOpacityIsPotentiallyAnimatingChanged(is_animating);
1464 layer->OnOpacityIsCurrentlyAnimatingChanged(is_animating); 1464 layer->OnOpacityIsCurrentlyAnimatingChanged(is_animating);
1465 break; 1465 break;
1466 } 1466 }
1467 } 1467 }
1468 } 1468 }
1469 1469
1470 void LayerTreeHost::ElementFilterIsAnimatingChanged(
1471 ElementId element_id,
1472 ElementListType list_type,
1473 AnimationChangeType change_type,
1474 bool is_animating) {
1475 Layer* layer = LayerByElementId(element_id);
1476 if (layer) {
1477 switch (change_type) {
1478 case AnimationChangeType::POTENTIAL:
1479 layer->OnFilterIsPotentiallyAnimatingChanged(is_animating);
1480 break;
1481 case AnimationChangeType::RUNNING:
1482 layer->OnFilterIsCurrentlyAnimatingChanged(is_animating);
1483 break;
1484 case AnimationChangeType::BOTH:
1485 layer->OnFilterIsPotentiallyAnimatingChanged(is_animating);
1486 layer->OnFilterIsCurrentlyAnimatingChanged(is_animating);
1487 break;
1488 }
1489 }
1490 }
1491
1470 gfx::ScrollOffset LayerTreeHost::GetScrollOffsetForAnimation( 1492 gfx::ScrollOffset LayerTreeHost::GetScrollOffsetForAnimation(
1471 ElementId element_id) const { 1493 ElementId element_id) const {
1472 Layer* layer = LayerByElementId(element_id); 1494 Layer* layer = LayerByElementId(element_id);
1473 DCHECK(layer); 1495 DCHECK(layer);
1474 return layer->ScrollOffsetForAnimation(); 1496 return layer->ScrollOffsetForAnimation();
1475 } 1497 }
1476 1498
1477 bool LayerTreeHost::IsSingleThreaded() const { 1499 bool LayerTreeHost::IsSingleThreaded() const {
1478 DCHECK(compositor_mode_ != CompositorMode::SINGLE_THREADED || 1500 DCHECK(compositor_mode_ != CompositorMode::SINGLE_THREADED ||
1479 !task_runner_provider_->HasImplThread()); 1501 !task_runner_provider_->HasImplThread());
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
1692 int seq_num = property_trees_.sequence_number; 1714 int seq_num = property_trees_.sequence_number;
1693 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) { 1715 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) {
1694 layer->set_property_tree_sequence_number(seq_num); 1716 layer->set_property_tree_sequence_number(seq_num);
1695 }); 1717 });
1696 1718
1697 surface_client_id_ = proto.surface_client_id(); 1719 surface_client_id_ = proto.surface_client_id();
1698 next_surface_sequence_ = proto.next_surface_sequence(); 1720 next_surface_sequence_ = proto.next_surface_sequence();
1699 } 1721 }
1700 1722
1701 } // namespace cc 1723 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698