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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 2349743004: cc: Remove things from OutputSurface and CompositorFrameSink. (Closed)
Patch Set: delete-stuff-cfs: comment-and-rebase Created 4 years, 3 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_impl.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl_unittest.cc
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index 0201952ec6b509d32ece997a1912cbe218896ebc..fd97ce6b806341866fa3c1eff23423c55614b4bb 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -144,9 +144,6 @@ class LayerTreeHostImplTest : public testing::Test,
}
void NotifyReadyToDraw() override {}
void SetNeedsRedrawOnImplThread() override { did_request_redraw_ = true; }
- void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) override {
- did_request_redraw_ = true;
- }
void SetNeedsOneBeginImplFrameOnImplThread() override {
did_request_next_frame_ = true;
}
@@ -8663,7 +8660,9 @@ TEST_F(LayerTreeHostImplTest, SimpleSwapPromiseMonitor) {
new SimpleSwapPromiseMonitor(
NULL, host_impl_.get(), &set_needs_commit_count,
&set_needs_redraw_count, &forward_to_main_count));
- host_impl_->SetNeedsRedrawRect(gfx::Rect(10, 10));
+ // Redraw with damage.
+ host_impl_->SetFullViewportDamage();
+ host_impl_->SetNeedsRedraw();
EXPECT_EQ(0, set_needs_commit_count);
EXPECT_EQ(2, set_needs_redraw_count);
EXPECT_EQ(0, forward_to_main_count);
@@ -8674,17 +8673,18 @@ TEST_F(LayerTreeHostImplTest, SimpleSwapPromiseMonitor) {
new SimpleSwapPromiseMonitor(
NULL, host_impl_.get(), &set_needs_commit_count,
&set_needs_redraw_count, &forward_to_main_count));
- // Empty damage rect won't signal the monitor.
- host_impl_->SetNeedsRedrawRect(gfx::Rect());
+ // Redraw without damage.
+ host_impl_->SetNeedsRedraw();
EXPECT_EQ(0, set_needs_commit_count);
- EXPECT_EQ(2, set_needs_redraw_count);
+ EXPECT_EQ(3, set_needs_redraw_count);
EXPECT_EQ(0, forward_to_main_count);
}
+ set_needs_commit_count = 0;
+ set_needs_redraw_count = 0;
+ forward_to_main_count = 0;
+
{
- set_needs_commit_count = 0;
- set_needs_redraw_count = 0;
- forward_to_main_count = 0;
std::unique_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor(
new SimpleSwapPromiseMonitor(
NULL, host_impl_.get(), &set_needs_commit_count,
@@ -11067,8 +11067,7 @@ class MockReclaimResourcesCompositorFrameSink : public FakeCompositorFrameSink {
public:
MockReclaimResourcesCompositorFrameSink()
: FakeCompositorFrameSink(TestContextProvider::Create(),
- TestContextProvider::CreateWorker(),
- true) {}
+ TestContextProvider::CreateWorker()) {}
MOCK_METHOD0(ForceReclaimResources, void());
};
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698