| 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/layer_tree_host.h" | 5 #include "cc/layer_tree_host.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "cc/content_layer.h" | 8 #include "cc/content_layer.h" |
| 9 #include "cc/delegated_renderer_layer.h" | 9 #include "cc/delegated_renderer_layer.h" |
| 10 #include "cc/delegated_renderer_layer_impl.h" | 10 #include "cc/delegated_renderer_layer_impl.h" |
| (...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 773 scoped_refptr<VideoFrame> hw_video_frame_; | 773 scoped_refptr<VideoFrame> hw_video_frame_; |
| 774 scoped_refptr<VideoFrame> scaled_hw_video_frame_; | 774 scoped_refptr<VideoFrame> scaled_hw_video_frame_; |
| 775 | 775 |
| 776 FakeVideoFrameProvider color_frame_provider_; | 776 FakeVideoFrameProvider color_frame_provider_; |
| 777 FakeVideoFrameProvider hw_frame_provider_; | 777 FakeVideoFrameProvider hw_frame_provider_; |
| 778 FakeVideoFrameProvider scaled_hw_frame_provider_; | 778 FakeVideoFrameProvider scaled_hw_frame_provider_; |
| 779 }; | 779 }; |
| 780 | 780 |
| 781 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestDontUseLostResources) | 781 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestDontUseLostResources) |
| 782 | 782 |
| 783 class LayerTreeHostContextTestFailsImmediately : | |
| 784 public LayerTreeHostContextTest { | |
| 785 public: | |
| 786 LayerTreeHostContextTestFailsImmediately() | |
| 787 : LayerTreeHostContextTest() { | |
| 788 } | |
| 789 | |
| 790 virtual ~LayerTreeHostContextTestFailsImmediately() {} | |
| 791 | |
| 792 virtual void beginTest() OVERRIDE { | |
| 793 postSetNeedsCommitToMainThread(); | |
| 794 } | |
| 795 | |
| 796 virtual void afterTest() OVERRIDE { | |
| 797 } | |
| 798 | |
| 799 virtual scoped_ptr<FakeWebGraphicsContext3D> CreateContext3d() OVERRIDE { | |
| 800 scoped_ptr<FakeWebGraphicsContext3D> context = | |
| 801 LayerTreeHostContextTest::CreateContext3d(); | |
| 802 context->loseContextCHROMIUM(); | |
| 803 return context.Pass(); | |
| 804 } | |
| 805 | |
| 806 virtual void didRecreateOutputSurface(bool succeeded) OVERRIDE { | |
| 807 EXPECT_FALSE(succeeded); | |
| 808 // If we make it this far without crashing, we pass! | |
| 809 endTest(); | |
| 810 } | |
| 811 }; | |
| 812 | |
| 813 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestFailsImmediately); | |
| 814 | |
| 815 } // namespace | 783 } // namespace |
| 816 } // namespace cc | 784 } // namespace cc |
| OLD | NEW |