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

Side by Side 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: fix cc_unittests 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 unified diff | Download patch
« no previous file with comments | « no previous file | cc/layer_tree_settings.cc » ('j') | cc/layer_tree_settings.cc » ('J')
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/layer_tree_host.h" 5 #include "cc/layer_tree_host.h"
6 6
7 #include "cc/content_layer.h" 7 #include "cc/content_layer.h"
8 #include "cc/layer.h" 8 #include "cc/layer.h"
9 #include "cc/layer_impl.h" 9 #include "cc/layer_impl.h"
10 #include "cc/layer_tree_impl.h" 10 #include "cc/layer_tree_impl.h"
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 case 0: 551 case 0:
552 if (!impl->pendingTree()) { 552 if (!impl->pendingTree()) {
553 can_activate_ = false; 553 can_activate_ = false;
554 EXPECT_VECTOR_EQ(root->scrollDelta(), gfx::Vector2d()); 554 EXPECT_VECTOR_EQ(root->scrollDelta(), gfx::Vector2d());
555 root->scrollBy(impl_thread_scroll1_); 555 root->scrollBy(impl_thread_scroll1_);
556 556
557 EXPECT_VECTOR_EQ(root->scrollOffset(), initial_scroll_); 557 EXPECT_VECTOR_EQ(root->scrollOffset(), initial_scroll_);
558 EXPECT_VECTOR_EQ(root->scrollDelta(), impl_thread_scroll1_); 558 EXPECT_VECTOR_EQ(root->scrollDelta(), impl_thread_scroll1_);
559 EXPECT_VECTOR_EQ(root->sentScrollDelta(), gfx::Vector2d()); 559 EXPECT_VECTOR_EQ(root->sentScrollDelta(), gfx::Vector2d());
560 postSetNeedsCommitToMainThread(); 560 postSetNeedsCommitToMainThread();
561 impl->setNeedsRedraw();
nduca 2013/01/15 01:54:54 any idea why this one happened?
enne (OOO) 2013/01/15 01:58:35 Yeah, I talked with Brian about this. Previously
brianderson 2013/01/15 02:01:56 Will have commit complete trigger setNeedsRedraw o
561 } else { 562 } else {
562 can_activate_ = true; 563 can_activate_ = true;
563 ASSERT_TRUE(pending_root); 564 ASSERT_TRUE(pending_root);
564 EXPECT_EQ(impl->pendingTree()->source_frame_number(), 1); 565 EXPECT_EQ(impl->pendingTree()->source_frame_number(), 1);
565 566
566 root->scrollBy(impl_thread_scroll2_); 567 root->scrollBy(impl_thread_scroll2_);
567 EXPECT_VECTOR_EQ(root->scrollOffset(), initial_scroll_); 568 EXPECT_VECTOR_EQ(root->scrollOffset(), initial_scroll_);
568 EXPECT_VECTOR_EQ(root->scrollDelta(), 569 EXPECT_VECTOR_EQ(root->scrollDelta(),
569 impl_thread_scroll1_ + impl_thread_scroll2_); 570 impl_thread_scroll1_ + impl_thread_scroll2_);
570 EXPECT_VECTOR_EQ(root->sentScrollDelta(), impl_thread_scroll1_); 571 EXPECT_VECTOR_EQ(root->sentScrollDelta(), impl_thread_scroll1_);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 gfx::Vector2d impl_thread_scroll1_; 604 gfx::Vector2d impl_thread_scroll1_;
604 gfx::Vector2d impl_thread_scroll2_; 605 gfx::Vector2d impl_thread_scroll2_;
605 int num_scrolls_; 606 int num_scrolls_;
606 bool can_activate_; 607 bool can_activate_;
607 }; 608 };
608 609
609 MULTI_THREAD_TEST_F(ImplSidePaintingScrollTestSimple); 610 MULTI_THREAD_TEST_F(ImplSidePaintingScrollTestSimple);
610 611
611 } // namespace 612 } // namespace
612 } // namespace cc 613 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layer_tree_settings.cc » ('j') | cc/layer_tree_settings.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698