| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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.h" | 5 #include "cc/trees/layer_tree_host.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "cc/layers/content_layer.h" | 8 #include "cc/layers/content_layer.h" |
| 9 #include "cc/layers/delegated_frame_provider.h" | 9 #include "cc/layers/delegated_frame_provider.h" |
| 10 #include "cc/layers/delegated_frame_resource_collection.h" | 10 #include "cc/layers/delegated_frame_resource_collection.h" |
| (...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 976 | 976 |
| 977 class LayerTreeHostContextTestDontUseLostResources | 977 class LayerTreeHostContextTestDontUseLostResources |
| 978 : public LayerTreeHostContextTest { | 978 : public LayerTreeHostContextTest { |
| 979 public: | 979 public: |
| 980 LayerTreeHostContextTestDontUseLostResources() : lost_context_(false) { | 980 LayerTreeHostContextTestDontUseLostResources() : lost_context_(false) { |
| 981 context_should_support_io_surface_ = true; | 981 context_should_support_io_surface_ = true; |
| 982 | 982 |
| 983 child_output_surface_ = FakeOutputSurface::Create3d(); | 983 child_output_surface_ = FakeOutputSurface::Create3d(); |
| 984 child_output_surface_->BindToClient(&output_surface_client_); | 984 child_output_surface_->BindToClient(&output_surface_client_); |
| 985 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); | 985 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); |
| 986 child_resource_provider_ = | 986 child_resource_provider_ = ResourceProvider::Create( |
| 987 ResourceProvider::Create(child_output_surface_.get(), | 987 child_output_surface_.get(), shared_bitmap_manager_.get(), NULL, NULL, |
| 988 shared_bitmap_manager_.get(), | 988 0, false, false, 1); |
| 989 NULL, | |
| 990 NULL, | |
| 991 0, | |
| 992 false, | |
| 993 1); | |
| 994 } | 989 } |
| 995 | 990 |
| 996 static void EmptyReleaseCallback(unsigned sync_point, bool lost) {} | 991 static void EmptyReleaseCallback(unsigned sync_point, bool lost) {} |
| 997 | 992 |
| 998 void SetupTree() override { | 993 void SetupTree() override { |
| 999 gpu::gles2::GLES2Interface* gl = | 994 gpu::gles2::GLES2Interface* gl = |
| 1000 child_output_surface_->context_provider()->ContextGL(); | 995 child_output_surface_->context_provider()->ContextGL(); |
| 1001 | 996 |
| 1002 scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData); | 997 scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData); |
| 1003 | 998 |
| (...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1843 void AfterTest() override {} | 1838 void AfterTest() override {} |
| 1844 | 1839 |
| 1845 bool deferred_; | 1840 bool deferred_; |
| 1846 }; | 1841 }; |
| 1847 | 1842 |
| 1848 SINGLE_AND_MULTI_THREAD_TEST_F( | 1843 SINGLE_AND_MULTI_THREAD_TEST_F( |
| 1849 LayerTreeHostContextTestLoseAfterSendingBeginMainFrame); | 1844 LayerTreeHostContextTestLoseAfterSendingBeginMainFrame); |
| 1850 | 1845 |
| 1851 } // namespace | 1846 } // namespace |
| 1852 } // namespace cc | 1847 } // namespace cc |
| OLD | NEW |