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

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

Issue 2860293002: Change cc::ElementId to be a uint64_t (Closed)
Patch Set: none Created 3 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
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/tree_synchronizer.h" 5 #include "cc/trees/tree_synchronizer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 scoped_refptr<Layer> scroll_clip_layer = Layer::Create(); 498 scoped_refptr<Layer> scroll_clip_layer = Layer::Create();
499 scoped_refptr<Layer> scroll_layer = Layer::Create(); 499 scoped_refptr<Layer> scroll_layer = Layer::Create();
500 scoped_refptr<Layer> transient_scroll_clip_layer = Layer::Create(); 500 scoped_refptr<Layer> transient_scroll_clip_layer = Layer::Create();
501 scoped_refptr<Layer> transient_scroll_layer = Layer::Create(); 501 scoped_refptr<Layer> transient_scroll_layer = Layer::Create();
502 502
503 layer_tree_root->AddChild(transient_scroll_clip_layer); 503 layer_tree_root->AddChild(transient_scroll_clip_layer);
504 transient_scroll_clip_layer->AddChild(transient_scroll_layer); 504 transient_scroll_clip_layer->AddChild(transient_scroll_layer);
505 transient_scroll_layer->AddChild(scroll_clip_layer); 505 transient_scroll_layer->AddChild(scroll_clip_layer);
506 scroll_clip_layer->AddChild(scroll_layer); 506 scroll_clip_layer->AddChild(scroll_layer);
507 507
508 ElementId scroll_element_id = ElementId(5, 4); 508 ElementId scroll_element_id = ElementId(5);
suzyh_UTC10 (ex-contributor) 2017/05/05 04:27:30 Does the behaviour of this test change at all, giv
chrishtr 2017/05/05 05:34:52 It shouldn't, because cc doesn't understand second
509 scroll_layer->SetElementId(scroll_element_id); 509 scroll_layer->SetElementId(scroll_element_id);
510 510
511 transient_scroll_layer->SetScrollClipLayerId( 511 transient_scroll_layer->SetScrollClipLayerId(
512 transient_scroll_clip_layer->id()); 512 transient_scroll_clip_layer->id());
513 scroll_layer->SetScrollClipLayerId(scroll_clip_layer->id()); 513 scroll_layer->SetScrollClipLayerId(scroll_clip_layer->id());
514 host_->SetRootLayer(layer_tree_root); 514 host_->SetRootLayer(layer_tree_root);
515 host_->BuildPropertyTreesForTesting(); 515 host_->BuildPropertyTreesForTesting();
516 host_->CommitAndCreatePendingTree(); 516 host_->CommitAndCreatePendingTree();
517 host_impl->ActivateSyncTree(); 517 host_impl->ActivateSyncTree();
518 518
(...skipping 26 matching lines...) Expand all
545 TestTaskGraphRunner task_graph_runner; 545 TestTaskGraphRunner task_graph_runner;
546 FakeLayerTreeHostImpl* host_impl = host_->host_impl(); 546 FakeLayerTreeHostImpl* host_impl = host_->host_impl();
547 host_impl->CreatePendingTree(); 547 host_impl->CreatePendingTree();
548 548
549 scoped_refptr<Layer> layer_tree_root = Layer::Create(); 549 scoped_refptr<Layer> layer_tree_root = Layer::Create();
550 scoped_refptr<Layer> scroll_clip_layer = Layer::Create(); 550 scoped_refptr<Layer> scroll_clip_layer = Layer::Create();
551 scoped_refptr<Layer> scroll_layer = Layer::Create(); 551 scoped_refptr<Layer> scroll_layer = Layer::Create();
552 scoped_refptr<Layer> transient_scroll_clip_layer = Layer::Create(); 552 scoped_refptr<Layer> transient_scroll_clip_layer = Layer::Create();
553 scoped_refptr<Layer> transient_scroll_layer = Layer::Create(); 553 scoped_refptr<Layer> transient_scroll_layer = Layer::Create();
554 554
555 ElementId scroll_element_id = ElementId(5, 4); 555 ElementId scroll_element_id = ElementId(5);
556 scroll_layer->SetElementId(scroll_element_id); 556 scroll_layer->SetElementId(scroll_element_id);
557 557
558 layer_tree_root->AddChild(transient_scroll_clip_layer); 558 layer_tree_root->AddChild(transient_scroll_clip_layer);
559 transient_scroll_clip_layer->AddChild(transient_scroll_layer); 559 transient_scroll_clip_layer->AddChild(transient_scroll_layer);
560 transient_scroll_layer->AddChild(scroll_clip_layer); 560 transient_scroll_layer->AddChild(scroll_clip_layer);
561 scroll_clip_layer->AddChild(scroll_layer); 561 scroll_clip_layer->AddChild(scroll_layer);
562 562
563 transient_scroll_layer->SetScrollClipLayerId( 563 transient_scroll_layer->SetScrollClipLayerId(
564 transient_scroll_clip_layer->id()); 564 transient_scroll_clip_layer->id());
565 scroll_layer->SetScrollClipLayerId(scroll_clip_layer->id()); 565 scroll_layer->SetScrollClipLayerId(scroll_clip_layer->id());
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 host_->CommitAndCreatePendingTree(); 687 host_->CommitAndCreatePendingTree();
688 host_impl->ActivateSyncTree(); 688 host_impl->ActivateSyncTree();
689 EXPECT_EQ( 689 EXPECT_EQ(
690 CombinedAnimationScale(0.f, 0.f), 690 CombinedAnimationScale(0.f, 0.f),
691 host_impl->active_tree()->property_trees()->GetAnimationScales( 691 host_impl->active_tree()->property_trees()->GetAnimationScales(
692 transform_layer->transform_tree_index(), host_impl->active_tree())); 692 transform_layer->transform_tree_index(), host_impl->active_tree()));
693 } 693 }
694 694
695 } // namespace 695 } // namespace
696 } // namespace cc 696 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698