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

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

Issue 1437413002: cc: Remove ScopedPtrVector and cc::remove_if. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: just the vector Created 5 years, 1 month 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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 expected_scroll_layer_->scroll_offset()); 557 expected_scroll_layer_->scroll_offset());
558 break; 558 break;
559 } 559 }
560 } 560 }
561 561
562 void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override { 562 void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
563 LayerImpl* inner_scroll = impl->InnerViewportScrollLayer(); 563 LayerImpl* inner_scroll = impl->InnerViewportScrollLayer();
564 FakePictureLayerImpl* root_scroll_layer_impl = 564 FakePictureLayerImpl* root_scroll_layer_impl =
565 static_cast<FakePictureLayerImpl*>(impl->OuterViewportScrollLayer()); 565 static_cast<FakePictureLayerImpl*>(impl->OuterViewportScrollLayer());
566 FakePictureLayerImpl* child_layer_impl = static_cast<FakePictureLayerImpl*>( 566 FakePictureLayerImpl* child_layer_impl = static_cast<FakePictureLayerImpl*>(
567 root_scroll_layer_impl->children()[0]); 567 root_scroll_layer_impl->children()[0].get());
568 568
569 LayerImpl* expected_scroll_layer_impl = NULL; 569 LayerImpl* expected_scroll_layer_impl = NULL;
570 LayerImpl* expected_no_scroll_layer_impl = NULL; 570 LayerImpl* expected_no_scroll_layer_impl = NULL;
571 if (scroll_child_layer_) { 571 if (scroll_child_layer_) {
572 expected_scroll_layer_impl = child_layer_impl; 572 expected_scroll_layer_impl = child_layer_impl;
573 expected_no_scroll_layer_impl = root_scroll_layer_impl; 573 expected_no_scroll_layer_impl = root_scroll_layer_impl;
574 } else { 574 } else {
575 expected_scroll_layer_impl = root_scroll_layer_impl; 575 expected_scroll_layer_impl = root_scroll_layer_impl;
576 expected_no_scroll_layer_impl = child_layer_impl; 576 expected_no_scroll_layer_impl = child_layer_impl;
577 } 577 }
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 RunTest(true, false); 1221 RunTest(true, false);
1222 } 1222 }
1223 1223
1224 TEST_F(LayerTreeHostScrollTestLayerStructureChange, ScrollDestroyWholeTree) { 1224 TEST_F(LayerTreeHostScrollTestLayerStructureChange, ScrollDestroyWholeTree) {
1225 scroll_destroy_whole_tree_ = true; 1225 scroll_destroy_whole_tree_ = true;
1226 RunTest(true, false); 1226 RunTest(true, false);
1227 } 1227 }
1228 1228
1229 } // namespace 1229 } // namespace
1230 } // namespace cc 1230 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698