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

Side by Side Diff: cc/surfaces/direct_compositor_frame_sink_unittest.cc

Issue 2609253003: Remove ForceReclaimResources (Closed)
Patch Set: Make test cases / phases the same Created 3 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 | « cc/surfaces/direct_compositor_frame_sink.cc ('k') | cc/surfaces/surface.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/surfaces/direct_compositor_frame_sink.h" 5 #include "cc/surfaces/direct_compositor_frame_sink.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "cc/output/renderer_settings.h" 10 #include "cc/output/renderer_settings.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 EXPECT_EQ(1u, display_output_surface_->num_sent_frames()); 131 EXPECT_EQ(1u, display_output_surface_->num_sent_frames());
132 SwapBuffersWithDamage(display_rect_); 132 SwapBuffersWithDamage(display_rect_);
133 task_runner_->RunUntilIdle(); 133 task_runner_->RunUntilIdle();
134 EXPECT_EQ(1u, display_output_surface_->num_sent_frames()); 134 EXPECT_EQ(1u, display_output_surface_->num_sent_frames());
135 display_output_surface_->set_suspended_for_recycle(false); 135 display_output_surface_->set_suspended_for_recycle(false);
136 SwapBuffersWithDamage(display_rect_); 136 SwapBuffersWithDamage(display_rect_);
137 task_runner_->RunUntilIdle(); 137 task_runner_->RunUntilIdle();
138 EXPECT_EQ(2u, display_output_surface_->num_sent_frames()); 138 EXPECT_EQ(2u, display_output_surface_->num_sent_frames());
139 } 139 }
140 140
141 TEST_F(DirectCompositorFrameSinkTest,
142 LockingResourcesDoesNotIndirectlyCauseDamage) {
143 compositor_frame_sink_->ForceReclaimResources();
144 EXPECT_EQ(1u, display_output_surface_->num_sent_frames());
145 task_runner_->RunPendingTasks();
146 EXPECT_EQ(1u, display_output_surface_->num_sent_frames());
147
148 SwapBuffersWithDamage(gfx::Rect());
149 EXPECT_EQ(1u, display_output_surface_->num_sent_frames());
150 task_runner_->RunUntilIdle();
151 EXPECT_EQ(1u, display_output_surface_->num_sent_frames());
152 }
153
154 } // namespace 141 } // namespace
155 } // namespace cc 142 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/direct_compositor_frame_sink.cc ('k') | cc/surfaces/surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698