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

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

Issue 1801853002: Transfer LayerImpl ownership to LayerTreeImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more asan. Created 4 years, 9 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "base/location.h" 7 #include "base/location.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 expected_scroll_layer_->scroll_offset()); 599 expected_scroll_layer_->scroll_offset());
600 break; 600 break;
601 } 601 }
602 } 602 }
603 603
604 void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override { 604 void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
605 LayerImpl* inner_scroll = impl->InnerViewportScrollLayer(); 605 LayerImpl* inner_scroll = impl->InnerViewportScrollLayer();
606 FakePictureLayerImpl* root_scroll_layer_impl = 606 FakePictureLayerImpl* root_scroll_layer_impl =
607 static_cast<FakePictureLayerImpl*>(impl->OuterViewportScrollLayer()); 607 static_cast<FakePictureLayerImpl*>(impl->OuterViewportScrollLayer());
608 FakePictureLayerImpl* child_layer_impl = static_cast<FakePictureLayerImpl*>( 608 FakePictureLayerImpl* child_layer_impl = static_cast<FakePictureLayerImpl*>(
609 root_scroll_layer_impl->children()[0].get()); 609 root_scroll_layer_impl->children()[0]);
610 610
611 LayerImpl* expected_scroll_layer_impl = NULL; 611 LayerImpl* expected_scroll_layer_impl = NULL;
612 LayerImpl* expected_no_scroll_layer_impl = NULL; 612 LayerImpl* expected_no_scroll_layer_impl = NULL;
613 if (scroll_child_layer_) { 613 if (scroll_child_layer_) {
614 expected_scroll_layer_impl = child_layer_impl; 614 expected_scroll_layer_impl = child_layer_impl;
615 expected_no_scroll_layer_impl = root_scroll_layer_impl; 615 expected_no_scroll_layer_impl = root_scroll_layer_impl;
616 } else { 616 } else {
617 expected_scroll_layer_impl = root_scroll_layer_impl; 617 expected_scroll_layer_impl = root_scroll_layer_impl;
618 expected_no_scroll_layer_impl = child_layer_impl; 618 expected_no_scroll_layer_impl = child_layer_impl;
619 } 619 }
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after
1424 RunTest(CompositorMode::THREADED, false); 1424 RunTest(CompositorMode::THREADED, false);
1425 } 1425 }
1426 1426
1427 TEST_F(LayerTreeHostScrollTestLayerStructureChange, ScrollDestroyWholeTree) { 1427 TEST_F(LayerTreeHostScrollTestLayerStructureChange, ScrollDestroyWholeTree) {
1428 scroll_destroy_whole_tree_ = true; 1428 scroll_destroy_whole_tree_ = true;
1429 RunTest(CompositorMode::THREADED, false); 1429 RunTest(CompositorMode::THREADED, false);
1430 } 1430 }
1431 1431
1432 } // namespace 1432 } // namespace
1433 } // namespace cc 1433 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_picture.cc ('k') | cc/trees/layer_tree_host_unittest_video.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698