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

Side by Side Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 2193293004: cc: Make LayerTreeTests use a DelegatingRenderer and Display. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: display-layertreetest: self-nits Created 4 years, 4 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
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 7787 matching lines...) Expand 10 before | Expand all | Expand 10 after
7798 TEST_F(LayerTreeHostImplTest, ShutdownReleasesContext) { 7798 TEST_F(LayerTreeHostImplTest, ShutdownReleasesContext) {
7799 scoped_refptr<TestContextProvider> context_provider = 7799 scoped_refptr<TestContextProvider> context_provider =
7800 TestContextProvider::Create(); 7800 TestContextProvider::Create();
7801 7801
7802 CreateHostImpl( 7802 CreateHostImpl(
7803 DefaultSettings(), 7803 DefaultSettings(),
7804 base::MakeUnique<TestDelegatingOutputSurface>( 7804 base::MakeUnique<TestDelegatingOutputSurface>(
7805 context_provider, TestContextProvider::CreateWorker(), 7805 context_provider, TestContextProvider::CreateWorker(),
7806 FakeOutputSurface::Create3d(context_provider), nullptr, nullptr, 7806 FakeOutputSurface::Create3d(context_provider), nullptr, nullptr,
7807 RendererSettings(), base::ThreadTaskRunnerHandle::Get().get(), 7807 RendererSettings(), base::ThreadTaskRunnerHandle::Get().get(),
7808 true /* synchronous_composite */)); 7808 true /* synchronous_composite */,
7809 false /* force_disable_reclaim_resources */));
7809 7810
7810 SetupRootLayerImpl(LayerImpl::Create(host_impl_->active_tree(), 1)); 7811 SetupRootLayerImpl(LayerImpl::Create(host_impl_->active_tree(), 1));
7811 7812
7812 LayerImpl* root = host_impl_->active_tree()->root_layer_for_testing(); 7813 LayerImpl* root = host_impl_->active_tree()->root_layer_for_testing();
7813 root->test_properties()->copy_requests.push_back( 7814 root->test_properties()->copy_requests.push_back(
7814 CopyOutputRequest::CreateRequest( 7815 CopyOutputRequest::CreateRequest(
7815 base::Bind(&ShutdownReleasesContext_Callback))); 7816 base::Bind(&ShutdownReleasesContext_Callback)));
7816 host_impl_->active_tree()->BuildPropertyTreesForTesting(); 7817 host_impl_->active_tree()->BuildPropertyTreesForTesting();
7817 7818
7818 LayerTreeHostImpl::FrameData frame; 7819 LayerTreeHostImpl::FrameData frame;
(...skipping 2979 matching lines...) Expand 10 before | Expand all | Expand 10 after
10798 EXPECT_TRUE(host_impl_->use_gpu_rasterization()); 10799 EXPECT_TRUE(host_impl_->use_gpu_rasterization());
10799 10800
10800 // Re-initialize with a software output surface. 10801 // Re-initialize with a software output surface.
10801 output_surface_ = FakeOutputSurface::CreateDelegatingSoftware(); 10802 output_surface_ = FakeOutputSurface::CreateDelegatingSoftware();
10802 host_impl_->InitializeRenderer(output_surface_.get()); 10803 host_impl_->InitializeRenderer(output_surface_.get());
10803 EXPECT_FALSE(host_impl_->use_gpu_rasterization()); 10804 EXPECT_FALSE(host_impl_->use_gpu_rasterization());
10804 } 10805 }
10805 10806
10806 } // namespace 10807 } // namespace
10807 } // namespace cc 10808 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698