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 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 class LayerTreeHostContextTestDontUseLostResources | 672 class LayerTreeHostContextTestDontUseLostResources |
673 : public LayerTreeHostContextTest { | 673 : public LayerTreeHostContextTest { |
674 public: | 674 public: |
675 LayerTreeHostContextTestDontUseLostResources() : lost_context_(false) { | 675 LayerTreeHostContextTestDontUseLostResources() : lost_context_(false) { |
676 context_should_support_io_surface_ = true; | 676 context_should_support_io_surface_ = true; |
677 | 677 |
678 child_output_surface_ = FakeOutputSurface::Create3d(); | 678 child_output_surface_ = FakeOutputSurface::Create3d(); |
679 child_output_surface_->BindToClient(&output_surface_client_); | 679 child_output_surface_->BindToClient(&output_surface_client_); |
680 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); | 680 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); |
681 child_resource_provider_ = ResourceProvider::Create( | 681 child_resource_provider_ = ResourceProvider::Create( |
682 child_output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1); | 682 child_output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1, |
| 683 false); |
683 } | 684 } |
684 | 685 |
685 static void EmptyReleaseCallback(unsigned sync_point, bool lost) {} | 686 static void EmptyReleaseCallback(unsigned sync_point, bool lost) {} |
686 | 687 |
687 virtual void SetupTree() OVERRIDE { | 688 virtual void SetupTree() OVERRIDE { |
688 gpu::gles2::GLES2Interface* gl = | 689 gpu::gles2::GLES2Interface* gl = |
689 child_output_surface_->context_provider()->ContextGL(); | 690 child_output_surface_->context_provider()->ContextGL(); |
690 | 691 |
691 scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData); | 692 scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData); |
692 | 693 |
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1713 | 1714 |
1714 protected: | 1715 protected: |
1715 FakeContentLayerClient client_; | 1716 FakeContentLayerClient client_; |
1716 scoped_refptr<FakeContentLayer> layer_; | 1717 scoped_refptr<FakeContentLayer> layer_; |
1717 }; | 1718 }; |
1718 | 1719 |
1719 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestSurfaceCreateCallback); | 1720 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestSurfaceCreateCallback); |
1720 | 1721 |
1721 } // namespace | 1722 } // namespace |
1722 } // namespace cc | 1723 } // namespace cc |
OLD | NEW |