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

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

Issue 17351017: Re-land: cc: Add raster finished signals to RasterWorkerPool. (Closed) Base URL: http://git.chromium.org/chromium/src.git@new-graph-build
Patch Set: fix flaky unit tests Created 7 years, 5 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_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/memory/weak_ptr.h" 7 #include "base/memory/weak_ptr.h"
8 #include "cc/layers/content_layer.h" 8 #include "cc/layers/content_layer.h"
9 #include "cc/layers/layer.h" 9 #include "cc/layers/layer.h"
10 #include "cc/layers/layer_impl.h" 10 #include "cc/layers/layer_impl.h"
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 // change of main_thread_scroll. 563 // change of main_thread_scroll.
564 root->SetScrollOffset(initial_scroll_ + main_thread_scroll_ + 564 root->SetScrollOffset(initial_scroll_ + main_thread_scroll_ +
565 impl_thread_scroll1_); 565 impl_thread_scroll1_);
566 } 566 }
567 } 567 }
568 568
569 virtual bool CanActivatePendingTree(LayerTreeHostImpl* impl) OVERRIDE { 569 virtual bool CanActivatePendingTree(LayerTreeHostImpl* impl) OVERRIDE {
570 return can_activate_; 570 return can_activate_;
571 } 571 }
572 572
573 virtual bool CanActivatePendingTreeIfNeeded(LayerTreeHostImpl* impl)
574 OVERRIDE {
575 return can_activate_;
576 }
577
573 virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { 578 virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE {
574 // We force a second draw here of the first commit before activating 579 // We force a second draw here of the first commit before activating
575 // the second commit. 580 // the second commit.
576 if (impl->active_tree()->source_frame_number() == 0) 581 if (impl->active_tree()->source_frame_number() == 0)
577 impl->SetNeedsRedraw(); 582 impl->SetNeedsRedraw();
578 } 583 }
579 584
580 virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { 585 virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE {
581 ImplSidePaintingScrollTest::DrawLayersOnThread(impl); 586 ImplSidePaintingScrollTest::DrawLayersOnThread(impl);
582 587
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 RunTest(true, false, false); 843 RunTest(true, false, false);
839 } 844 }
840 845
841 TEST_F(LayerTreeHostScrollTestLayerStructureChange, ScrollDestroyWholeTree) { 846 TEST_F(LayerTreeHostScrollTestLayerStructureChange, ScrollDestroyWholeTree) {
842 scroll_destroy_whole_tree_ = true; 847 scroll_destroy_whole_tree_ = true;
843 RunTest(true, false, false); 848 RunTest(true, false, false);
844 } 849 }
845 850
846 } // namespace 851 } // namespace
847 } // namespace cc 852 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698