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

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

Issue 1987123002: cc : Track transform animation changes on transform tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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_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.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 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after
1345 1345
1346 void LayerTreeHost::SetElementScrollOffsetMutated( 1346 void LayerTreeHost::SetElementScrollOffsetMutated(
1347 ElementId element_id, 1347 ElementId element_id,
1348 ElementListType list_type, 1348 ElementListType list_type,
1349 const gfx::ScrollOffset& scroll_offset) { 1349 const gfx::ScrollOffset& scroll_offset) {
1350 Layer* layer = LayerById(element_id); 1350 Layer* layer = LayerById(element_id);
1351 DCHECK(layer); 1351 DCHECK(layer);
1352 layer->OnScrollOffsetAnimated(scroll_offset); 1352 layer->OnScrollOffsetAnimated(scroll_offset);
1353 } 1353 }
1354 1354
1355 void LayerTreeHost::ElementTransformIsPotentiallyAnimatingChanged( 1355 void LayerTreeHost::ElementTransformIsAnimatingChanged(
1356 ElementId element_id, 1356 ElementId element_id,
1357 ElementListType list_type, 1357 ElementListType list_type,
1358 AnimationChangeType change_type,
1358 bool is_animating) { 1359 bool is_animating) {
1359 Layer* layer = LayerById(element_id); 1360 Layer* layer = LayerById(element_id);
1360 DCHECK(layer); 1361 if (layer) {
1361 layer->OnTransformIsPotentiallyAnimatingChanged(is_animating); 1362 switch (change_type) {
1363 case AnimationChangeType::POTENTIAL:
1364 layer->OnTransformIsPotentiallyAnimatingChanged(is_animating);
1365 break;
1366 case AnimationChangeType::RUNNING:
1367 layer->OnTransformIsCurrentlyAnimatingChanged(is_animating);
1368 break;
1369 case AnimationChangeType::BOTH:
1370 layer->OnTransformIsPotentiallyAnimatingChanged(is_animating);
1371 layer->OnTransformIsCurrentlyAnimatingChanged(is_animating);
1372 break;
1373 }
1374 }
1362 } 1375 }
1363 1376
1364 void LayerTreeHost::ElementOpacityIsAnimatingChanged( 1377 void LayerTreeHost::ElementOpacityIsAnimatingChanged(
1365 ElementId element_id, 1378 ElementId element_id,
1366 ElementListType list_type, 1379 ElementListType list_type,
1367 AnimationChangeType change_type, 1380 AnimationChangeType change_type,
1368 bool is_animating) { 1381 bool is_animating) {
1369 Layer* layer = LayerById(element_id); 1382 Layer* layer = LayerById(element_id);
1370 if (layer) { 1383 if (layer) {
1371 switch (change_type) { 1384 switch (change_type) {
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
1659 int seq_num = property_trees_.sequence_number; 1672 int seq_num = property_trees_.sequence_number;
1660 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) { 1673 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) {
1661 layer->set_property_tree_sequence_number(seq_num); 1674 layer->set_property_tree_sequence_number(seq_num);
1662 }); 1675 });
1663 1676
1664 surface_id_namespace_ = proto.surface_id_namespace(); 1677 surface_id_namespace_ = proto.surface_id_namespace();
1665 next_surface_sequence_ = proto.next_surface_sequence(); 1678 next_surface_sequence_ = proto.next_surface_sequence();
1666 } 1679 }
1667 1680
1668 } // namespace cc 1681 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698