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/delegated_frame_provider.h" | 8 #include "cc/layers/delegated_frame_provider.h" |
9 #include "cc/layers/delegated_frame_resource_collection.h" | 9 #include "cc/layers/delegated_frame_resource_collection.h" |
10 #include "cc/layers/heads_up_display_layer.h" | 10 #include "cc/layers/heads_up_display_layer.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 else | 104 else |
105 return FakeOutputSurface::Create3d(context3d.Pass()); | 105 return FakeOutputSurface::Create3d(context3d.Pass()); |
106 } | 106 } |
107 | 107 |
108 DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, | 108 DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, |
109 LayerTreeHostImpl::FrameData* frame, | 109 LayerTreeHostImpl::FrameData* frame, |
110 DrawResult draw_result) override { | 110 DrawResult draw_result) override { |
111 if (draw_result == DRAW_ABORTED_MISSING_HIGH_RES_CONTENT) { | 111 if (draw_result == DRAW_ABORTED_MISSING_HIGH_RES_CONTENT) { |
112 // Only valid for single-threaded compositing, which activates | 112 // Only valid for single-threaded compositing, which activates |
113 // immediately and will try to draw again when content has finished. | 113 // immediately and will try to draw again when content has finished. |
114 DCHECK(!host_impl->proxy()->HasImplThread()); | 114 DCHECK(!host_impl->thread_verifier()->HasImplThread()); |
115 return draw_result; | 115 return draw_result; |
116 } | 116 } |
117 EXPECT_EQ(DRAW_SUCCESS, draw_result); | 117 EXPECT_EQ(DRAW_SUCCESS, draw_result); |
118 if (!times_to_lose_during_draw_) | 118 if (!times_to_lose_during_draw_) |
119 return draw_result; | 119 return draw_result; |
120 | 120 |
121 --times_to_lose_during_draw_; | 121 --times_to_lose_during_draw_; |
122 LoseContext(); | 122 LoseContext(); |
123 | 123 |
124 times_to_fail_create_ = times_to_fail_recreate_; | 124 times_to_fail_create_ = times_to_fail_recreate_; |
(...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1622 void AfterTest() override {} | 1622 void AfterTest() override {} |
1623 | 1623 |
1624 bool deferred_; | 1624 bool deferred_; |
1625 }; | 1625 }; |
1626 | 1626 |
1627 SINGLE_AND_MULTI_THREAD_TEST_F( | 1627 SINGLE_AND_MULTI_THREAD_TEST_F( |
1628 LayerTreeHostContextTestLoseAfterSendingBeginMainFrame); | 1628 LayerTreeHostContextTestLoseAfterSendingBeginMainFrame); |
1629 | 1629 |
1630 } // namespace | 1630 } // namespace |
1631 } // namespace cc | 1631 } // namespace cc |
OLD | NEW |