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

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

Issue 15139007: Ensure LayerTreeHostImpl's current frame time is updated every frame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/single_thread_proxy.cc » ('j') | 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 "cc/base/thread_impl.h" 7 #include "cc/base/thread_impl.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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 initial_scroll_ + impl_thread_scroll1_); 594 initial_scroll_ + impl_thread_scroll1_);
595 595
596 // Pretend like Javascript updated the scroll position itself with a 596 // Pretend like Javascript updated the scroll position itself with a
597 // change of main_thread_scroll. 597 // change of main_thread_scroll.
598 root->SetScrollOffset(initial_scroll_ + 598 root->SetScrollOffset(initial_scroll_ +
599 main_thread_scroll_ + 599 main_thread_scroll_ +
600 impl_thread_scroll1_); 600 impl_thread_scroll1_);
601 } 601 }
602 } 602 }
603 603
604 virtual bool CanActivatePendingTree() OVERRIDE { 604 virtual bool CanActivatePendingTree(LayerTreeHostImpl* impl) OVERRIDE {
605 return can_activate_; 605 return can_activate_;
606 } 606 }
607 607
608 virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { 608 virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE {
609 // We force a second draw here of the first commit before activating 609 // We force a second draw here of the first commit before activating
610 // the second commit. 610 // the second commit.
611 if (impl->active_tree()->source_frame_number() == 0) 611 if (impl->active_tree()->source_frame_number() == 0)
612 impl->SetNeedsRedraw(); 612 impl->SetNeedsRedraw();
613 } 613 }
614 614
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 LayerTreeHost::Create(&client, settings, impl_ccthread.Pass()); 793 LayerTreeHost::Create(&client, settings, impl_ccthread.Pass());
794 794
795 layer_tree_host->DidStopFlinging(); 795 layer_tree_host->DidStopFlinging();
796 layer_tree_host.reset(); 796 layer_tree_host.reset();
797 impl_thread.Stop(); 797 impl_thread.Stop();
798 EXPECT_TRUE(received_stop_flinging); 798 EXPECT_TRUE(received_stop_flinging);
799 } 799 }
800 800
801 } // namespace 801 } // namespace
802 } // namespace cc 802 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698