OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "cc/delegated_frame_data.h" | 7 #include "cc/delegated_frame_data.h" |
8 #include "cc/delegated_renderer_layer.h" | 8 #include "cc/delegated_renderer_layer.h" |
9 #include "cc/delegated_renderer_layer_impl.h" | 9 #include "cc/delegated_renderer_layer_impl.h" |
10 #include "cc/layer_tree_impl.h" | 10 #include "cc/layer_tree_impl.h" |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 case 14: | 236 case 14: |
237 // Should create zero damage. | 237 // Should create zero damage. |
238 m_layerTreeHost->SetNeedsCommit(); | 238 m_layerTreeHost->SetNeedsCommit(); |
239 break; | 239 break; |
240 } | 240 } |
241 first_draw_for_source_frame_ = true; | 241 first_draw_for_source_frame_ = true; |
242 } | 242 } |
243 | 243 |
244 virtual bool prepareToDrawOnThread(LayerTreeHostImpl* host_impl, | 244 virtual bool prepareToDrawOnThread(LayerTreeHostImpl* host_impl, |
245 LayerTreeHostImpl::FrameData* frame, | 245 LayerTreeHostImpl::FrameData* frame, |
246 bool result) { | 246 bool result) OVERRIDE { |
247 EXPECT_TRUE(result); | 247 EXPECT_TRUE(result); |
248 | 248 |
249 if (!first_draw_for_source_frame_) | 249 if (!first_draw_for_source_frame_) |
250 return result; | 250 return result; |
251 | 251 |
252 gfx::RectF damage_rect = frame->render_passes.back()->damage_rect; | 252 gfx::RectF damage_rect = frame->render_passes.back()->damage_rect; |
253 | 253 |
254 switch (host_impl->active_tree()->source_frame_number()) { | 254 switch (host_impl->active_tree()->source_frame_number()) { |
255 case 0: | 255 case 0: |
256 // Before the layer has a frame to display it should not | 256 // Before the layer has a frame to display it should not |
(...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1229 } | 1229 } |
1230 } | 1230 } |
1231 | 1231 |
1232 virtual void afterTest() OVERRIDE {} | 1232 virtual void afterTest() OVERRIDE {} |
1233 }; | 1233 }; |
1234 | 1234 |
1235 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDelegatedTestCommitWithoutTake) | 1235 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDelegatedTestCommitWithoutTake) |
1236 | 1236 |
1237 } // namespace | 1237 } // namespace |
1238 } // namespace cc | 1238 } // namespace cc |
OLD | NEW |