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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 2609253003: Remove ForceReclaimResources (Closed)
Patch Set: cleanup 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 side-by-side diff with in-line comments
Download patch
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 c540c24de2a5a51b6985f274081519c80cf8a109..3b18b31fb996670d1ee4102df0d400f0d75b0035 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -8412,8 +8412,7 @@ TEST_F(LayerTreeHostImplTest, ShutdownReleasesContext) {
auto compositor_frame_sink = base::MakeUnique<TestCompositorFrameSink>(
context_provider, TestContextProvider::CreateWorker(), nullptr, nullptr,
RendererSettings(), base::ThreadTaskRunnerHandle::Get().get(),
- true /* synchronous_composite */,
- false /* force_disable_reclaim_resources */);
+ true /* synchronous_composite */);
compositor_frame_sink->SetClient(&test_client_);
CreateHostImpl(DefaultSettings(), std::move(compositor_frame_sink));
@@ -11413,32 +11412,6 @@ TEST_F(MsaaIsSlowLayerTreeHostImplTest, GpuRasterizationStatusMsaaIsSlow) {
EXPECT_FALSE(host_impl_->use_gpu_rasterization());
}
-// A mock output surface which lets us detect calls to ForceReclaimResources.
-class MockReclaimResourcesCompositorFrameSink : public FakeCompositorFrameSink {
- public:
- MockReclaimResourcesCompositorFrameSink()
- : FakeCompositorFrameSink(TestContextProvider::Create(),
- TestContextProvider::CreateWorker()) {}
-
- MOCK_METHOD0(ForceReclaimResources, void());
-};
-
-// Display::Draw (and the planned Display Scheduler) currently rely on resources
-// being reclaimed to block drawing between BeginCommit / Swap. This test
-// ensures that BeginCommit triggers ForceReclaimResources. See
-// crbug.com/489515.
-TEST_F(LayerTreeHostImplTest, BeginCommitReclaimsResources) {
- auto compositor_frame_sink =
- base::MakeUnique<MockReclaimResourcesCompositorFrameSink>();
- // Hold an unowned pointer to the output surface to use for mock expectations.
- MockReclaimResourcesCompositorFrameSink* mock_compositor_frame_sink =
- compositor_frame_sink.get();
-
- CreateHostImpl(DefaultSettings(), std::move(compositor_frame_sink));
- EXPECT_CALL(*mock_compositor_frame_sink, ForceReclaimResources()).Times(1);
- host_impl_->BeginCommit();
-}
-
TEST_F(LayerTreeHostImplTest, UpdatePageScaleFactorOnActiveTree) {
// Check page scale factor update in property trees when an update is made
// on the active tree.

Powered by Google App Engine
This is Rietveld 408576698