| OLD | NEW |
| 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 7836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7847 TEST_F(LayerTreeHostImplTest, ShutdownReleasesContext) { | 7847 TEST_F(LayerTreeHostImplTest, ShutdownReleasesContext) { |
| 7848 scoped_refptr<TestContextProvider> context_provider = | 7848 scoped_refptr<TestContextProvider> context_provider = |
| 7849 TestContextProvider::Create(); | 7849 TestContextProvider::Create(); |
| 7850 | 7850 |
| 7851 CreateHostImpl( | 7851 CreateHostImpl( |
| 7852 DefaultSettings(), | 7852 DefaultSettings(), |
| 7853 base::MakeUnique<TestDelegatingOutputSurface>( | 7853 base::MakeUnique<TestDelegatingOutputSurface>( |
| 7854 context_provider, TestContextProvider::CreateWorker(), | 7854 context_provider, TestContextProvider::CreateWorker(), |
| 7855 FakeOutputSurface::Create3d(context_provider), nullptr, nullptr, | 7855 FakeOutputSurface::Create3d(context_provider), nullptr, nullptr, |
| 7856 RendererSettings(), base::ThreadTaskRunnerHandle::Get().get(), | 7856 RendererSettings(), base::ThreadTaskRunnerHandle::Get().get(), |
| 7857 true /* synchronous_composite */)); | 7857 true /* synchronous_composite */, |
| 7858 false /* force_disable_reclaim_resources */)); |
| 7858 | 7859 |
| 7859 SetupRootLayerImpl(LayerImpl::Create(host_impl_->active_tree(), 1)); | 7860 SetupRootLayerImpl(LayerImpl::Create(host_impl_->active_tree(), 1)); |
| 7860 | 7861 |
| 7861 LayerImpl* root = host_impl_->active_tree()->root_layer_for_testing(); | 7862 LayerImpl* root = host_impl_->active_tree()->root_layer_for_testing(); |
| 7862 root->test_properties()->copy_requests.push_back( | 7863 root->test_properties()->copy_requests.push_back( |
| 7863 CopyOutputRequest::CreateRequest( | 7864 CopyOutputRequest::CreateRequest( |
| 7864 base::Bind(&ShutdownReleasesContext_Callback))); | 7865 base::Bind(&ShutdownReleasesContext_Callback))); |
| 7865 host_impl_->active_tree()->BuildPropertyTreesForTesting(); | 7866 host_impl_->active_tree()->BuildPropertyTreesForTesting(); |
| 7866 | 7867 |
| 7867 LayerTreeHostImpl::FrameData frame; | 7868 LayerTreeHostImpl::FrameData frame; |
| (...skipping 2979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10847 EXPECT_TRUE(host_impl_->use_gpu_rasterization()); | 10848 EXPECT_TRUE(host_impl_->use_gpu_rasterization()); |
| 10848 | 10849 |
| 10849 // Re-initialize with a software output surface. | 10850 // Re-initialize with a software output surface. |
| 10850 output_surface_ = FakeOutputSurface::CreateDelegatingSoftware(); | 10851 output_surface_ = FakeOutputSurface::CreateDelegatingSoftware(); |
| 10851 host_impl_->InitializeRenderer(output_surface_.get()); | 10852 host_impl_->InitializeRenderer(output_surface_.get()); |
| 10852 EXPECT_FALSE(host_impl_->use_gpu_rasterization()); | 10853 EXPECT_FALSE(host_impl_->use_gpu_rasterization()); |
| 10853 } | 10854 } |
| 10854 | 10855 |
| 10855 } // namespace | 10856 } // namespace |
| 10856 } // namespace cc | 10857 } // namespace cc |
| OLD | NEW |