| OLD | NEW | 
|    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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  497   scoped_refptr<Layer> scroll_clip_layer = Layer::Create(); |  497   scoped_refptr<Layer> scroll_clip_layer = Layer::Create(); | 
|  498   scoped_refptr<Layer> scroll_layer = Layer::Create(); |  498   scoped_refptr<Layer> scroll_layer = Layer::Create(); | 
|  499   scoped_refptr<Layer> transient_scroll_clip_layer = Layer::Create(); |  499   scoped_refptr<Layer> transient_scroll_clip_layer = Layer::Create(); | 
|  500   scoped_refptr<Layer> transient_scroll_layer = Layer::Create(); |  500   scoped_refptr<Layer> transient_scroll_layer = Layer::Create(); | 
|  501  |  501  | 
|  502   layer_tree_root->AddChild(transient_scroll_clip_layer); |  502   layer_tree_root->AddChild(transient_scroll_clip_layer); | 
|  503   transient_scroll_clip_layer->AddChild(transient_scroll_layer); |  503   transient_scroll_clip_layer->AddChild(transient_scroll_layer); | 
|  504   transient_scroll_layer->AddChild(scroll_clip_layer); |  504   transient_scroll_layer->AddChild(scroll_clip_layer); | 
|  505   scroll_clip_layer->AddChild(scroll_layer); |  505   scroll_clip_layer->AddChild(scroll_layer); | 
|  506  |  506  | 
|  507   ElementId scroll_element_id = ElementId(5, 4); |  507   ElementId scroll_element_id = ElementId(5); | 
|  508   scroll_layer->SetElementId(scroll_element_id); |  508   scroll_layer->SetElementId(scroll_element_id); | 
|  509  |  509  | 
|  510   transient_scroll_layer->SetScrollClipLayerId( |  510   transient_scroll_layer->SetScrollClipLayerId( | 
|  511       transient_scroll_clip_layer->id()); |  511       transient_scroll_clip_layer->id()); | 
|  512   scroll_layer->SetScrollClipLayerId(scroll_clip_layer->id()); |  512   scroll_layer->SetScrollClipLayerId(scroll_clip_layer->id()); | 
|  513   host_->SetRootLayer(layer_tree_root); |  513   host_->SetRootLayer(layer_tree_root); | 
|  514   host_->BuildPropertyTreesForTesting(); |  514   host_->BuildPropertyTreesForTesting(); | 
|  515   host_->CommitAndCreatePendingTree(); |  515   host_->CommitAndCreatePendingTree(); | 
|  516   host_impl->ActivateSyncTree(); |  516   host_impl->ActivateSyncTree(); | 
|  517  |  517  | 
| (...skipping 26 matching lines...) Expand all  Loading... | 
|  544   TestTaskGraphRunner task_graph_runner; |  544   TestTaskGraphRunner task_graph_runner; | 
|  545   FakeLayerTreeHostImpl* host_impl = host_->host_impl(); |  545   FakeLayerTreeHostImpl* host_impl = host_->host_impl(); | 
|  546   host_impl->CreatePendingTree(); |  546   host_impl->CreatePendingTree(); | 
|  547  |  547  | 
|  548   scoped_refptr<Layer> layer_tree_root = Layer::Create(); |  548   scoped_refptr<Layer> layer_tree_root = Layer::Create(); | 
|  549   scoped_refptr<Layer> scroll_clip_layer = Layer::Create(); |  549   scoped_refptr<Layer> scroll_clip_layer = Layer::Create(); | 
|  550   scoped_refptr<Layer> scroll_layer = Layer::Create(); |  550   scoped_refptr<Layer> scroll_layer = Layer::Create(); | 
|  551   scoped_refptr<Layer> transient_scroll_clip_layer = Layer::Create(); |  551   scoped_refptr<Layer> transient_scroll_clip_layer = Layer::Create(); | 
|  552   scoped_refptr<Layer> transient_scroll_layer = Layer::Create(); |  552   scoped_refptr<Layer> transient_scroll_layer = Layer::Create(); | 
|  553  |  553  | 
|  554   ElementId scroll_element_id = ElementId(5, 4); |  554   ElementId scroll_element_id = ElementId(5); | 
|  555   scroll_layer->SetElementId(scroll_element_id); |  555   scroll_layer->SetElementId(scroll_element_id); | 
|  556  |  556  | 
|  557   layer_tree_root->AddChild(transient_scroll_clip_layer); |  557   layer_tree_root->AddChild(transient_scroll_clip_layer); | 
|  558   transient_scroll_clip_layer->AddChild(transient_scroll_layer); |  558   transient_scroll_clip_layer->AddChild(transient_scroll_layer); | 
|  559   transient_scroll_layer->AddChild(scroll_clip_layer); |  559   transient_scroll_layer->AddChild(scroll_clip_layer); | 
|  560   scroll_clip_layer->AddChild(scroll_layer); |  560   scroll_clip_layer->AddChild(scroll_layer); | 
|  561  |  561  | 
|  562   transient_scroll_layer->SetScrollClipLayerId( |  562   transient_scroll_layer->SetScrollClipLayerId( | 
|  563       transient_scroll_clip_layer->id()); |  563       transient_scroll_clip_layer->id()); | 
|  564   scroll_layer->SetScrollClipLayerId(scroll_clip_layer->id()); |  564   scroll_layer->SetScrollClipLayerId(scroll_clip_layer->id()); | 
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  686   host_->CommitAndCreatePendingTree(); |  686   host_->CommitAndCreatePendingTree(); | 
|  687   host_impl->ActivateSyncTree(); |  687   host_impl->ActivateSyncTree(); | 
|  688   EXPECT_EQ( |  688   EXPECT_EQ( | 
|  689       CombinedAnimationScale(0.f, 0.f), |  689       CombinedAnimationScale(0.f, 0.f), | 
|  690       host_impl->active_tree()->property_trees()->GetAnimationScales( |  690       host_impl->active_tree()->property_trees()->GetAnimationScales( | 
|  691           transform_layer->transform_tree_index(), host_impl->active_tree())); |  691           transform_layer->transform_tree_index(), host_impl->active_tree())); | 
|  692 } |  692 } | 
|  693  |  693  | 
|  694 }  // namespace |  694 }  // namespace | 
|  695 }  // namespace cc |  695 }  // namespace cc | 
| OLD | NEW |