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

Unified Diff: cc/trees/layer_tree_host_impl_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 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_pixeltest_tiles.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 79f9496bf672ac178de9cf9cb949bb7d8620f19e..eef547d8364a8a203caecad07c85d6c8fea40416 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -8364,8 +8364,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));
@@ -11404,32 +11403,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.
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_pixeltest_tiles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698