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

Unified Diff: cc/layer_tree_host_unittest_scroll.cc

Issue 11830040: cc: Do not request redraw on commit when impl-side painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@decouple_draw3
Patch Set: Use CC_EXPORT Created 7 years, 11 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/cc.gyp ('k') | cc/scheduler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host_unittest_scroll.cc
diff --git a/cc/layer_tree_host_unittest_scroll.cc b/cc/layer_tree_host_unittest_scroll.cc
index 5c30a22de8b5405d1d71ab8b25c4ca2574c72032..bfb5e5f2157f4274a5ae00d0a94443bfe7858925 100644
--- a/cc/layer_tree_host_unittest_scroll.cc
+++ b/cc/layer_tree_host_unittest_scroll.cc
@@ -537,6 +537,13 @@ class ImplSidePaintingScrollTestSimple : public ImplSidePaintingScrollTest {
return can_activate_;
}
+ virtual void commitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE {
+ // We force a second draw here of the first commit before activating
+ // the second commit.
+ if (impl->activeTree()->source_frame_number() == 0)
+ impl->setNeedsRedraw();
+ }
+
virtual void drawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE {
ImplSidePaintingScrollTest::drawLayersOnThread(impl);
@@ -558,6 +565,9 @@ class ImplSidePaintingScrollTestSimple : public ImplSidePaintingScrollTest {
EXPECT_VECTOR_EQ(root->scrollDelta(), impl_thread_scroll1_);
EXPECT_VECTOR_EQ(root->sentScrollDelta(), gfx::Vector2d());
postSetNeedsCommitToMainThread();
+
+ // commitCompleteOnThread will trigger this function again
+ // and cause us to take the else clause.
} else {
can_activate_ = true;
ASSERT_TRUE(pending_root);
« no previous file with comments | « cc/cc.gyp ('k') | cc/scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698