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

Unified Diff: cc/trees/layer_tree_host_unittest_scroll.cc

Issue 22926024: cc: Control activation from the Scheduler (Closed) Base URL: http://git.chromium.org/chromium/src.git@schedOutputSurface4
Patch Set: git cl format Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/single_thread_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest_scroll.cc
diff --git a/cc/trees/layer_tree_host_unittest_scroll.cc b/cc/trees/layer_tree_host_unittest_scroll.cc
index 585d5bf559c226b635f623b36c1d73b73de1e2d0..ab87be1b5c5a6f13c82199f1a7733fc841bfdc8f 100644
--- a/cc/trees/layer_tree_host_unittest_scroll.cc
+++ b/cc/trees/layer_tree_host_unittest_scroll.cc
@@ -722,8 +722,7 @@ class ImplSidePaintingScrollTestSimple : public ImplSidePaintingScrollTest {
main_thread_scroll_(40, 5),
impl_thread_scroll1_(2, -1),
impl_thread_scroll2_(-3, 10),
- num_scrolls_(0),
- can_activate_(true) {}
+ num_scrolls_(0) {}
virtual void BeginTest() OVERRIDE {
layer_tree_host()->root_layer()->SetScrollable(true);
@@ -748,15 +747,6 @@ class ImplSidePaintingScrollTestSimple : public ImplSidePaintingScrollTest {
}
}
- virtual bool CanActivatePendingTree(LayerTreeHostImpl* impl) OVERRIDE {
- return can_activate_;
- }
-
- virtual bool CanActivatePendingTreeIfNeeded(LayerTreeHostImpl* impl)
- OVERRIDE {
- return can_activate_;
- }
-
virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE {
// We force a second draw here of the first commit before activating
// the second commit.
@@ -774,7 +764,7 @@ class ImplSidePaintingScrollTestSimple : public ImplSidePaintingScrollTest {
switch (impl->active_tree()->source_frame_number()) {
case 0:
if (!impl->pending_tree()) {
- can_activate_ = false;
+ impl->BlockNotifyReadyToActivateForTesting(true);
EXPECT_VECTOR_EQ(root->ScrollDelta(), gfx::Vector2d());
root->ScrollBy(impl_thread_scroll1_);
@@ -786,7 +776,7 @@ class ImplSidePaintingScrollTestSimple : public ImplSidePaintingScrollTest {
// CommitCompleteOnThread will trigger this function again
// and cause us to take the else clause.
} else {
- can_activate_ = true;
+ impl->BlockNotifyReadyToActivateForTesting(false);
ASSERT_TRUE(pending_root);
EXPECT_EQ(impl->pending_tree()->source_frame_number(), 1);
@@ -828,7 +818,6 @@ class ImplSidePaintingScrollTestSimple : public ImplSidePaintingScrollTest {
gfx::Vector2d impl_thread_scroll1_;
gfx::Vector2d impl_thread_scroll2_;
int num_scrolls_;
- bool can_activate_;
};
MULTI_THREAD_TEST_F(ImplSidePaintingScrollTestSimple);
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/single_thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698