| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 6400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6411 content_layer->SetDrawsContent(true); | 6411 content_layer->SetDrawsContent(true); |
| 6412 | 6412 |
| 6413 root->SetBounds(root_size); | 6413 root->SetBounds(root_size); |
| 6414 | 6414 |
| 6415 gfx::ScrollOffset scroll_offset(100000, 0); | 6415 gfx::ScrollOffset scroll_offset(100000, 0); |
| 6416 scrolling_layer->SetScrollClipLayer(root->id()); | 6416 scrolling_layer->SetScrollClipLayer(root->id()); |
| 6417 scrolling_layer->PushScrollOffsetFromMainThread(scroll_offset); | 6417 scrolling_layer->PushScrollOffsetFromMainThread(scroll_offset); |
| 6418 | 6418 |
| 6419 host_impl_->ActivateSyncTree(); | 6419 host_impl_->ActivateSyncTree(); |
| 6420 | 6420 |
| 6421 bool update_lcd_text = false; | 6421 bool first_update_after_commit = false; |
| 6422 host_impl_->active_tree()->UpdateDrawProperties(update_lcd_text); | 6422 host_impl_->active_tree()->UpdateDrawProperties(first_update_after_commit); |
| 6423 ASSERT_EQ(1u, host_impl_->active_tree()->RenderSurfaceLayerList().size()); | 6423 ASSERT_EQ(1u, host_impl_->active_tree()->RenderSurfaceLayerList().size()); |
| 6424 | 6424 |
| 6425 LayerTreeHostImpl::FrameData frame; | 6425 LayerTreeHostImpl::FrameData frame; |
| 6426 EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame)); | 6426 EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame)); |
| 6427 | 6427 |
| 6428 ASSERT_EQ(1u, frame.render_passes.size()); | 6428 ASSERT_EQ(1u, frame.render_passes.size()); |
| 6429 ASSERT_LE(1u, frame.render_passes[0]->quad_list.size()); | 6429 ASSERT_LE(1u, frame.render_passes[0]->quad_list.size()); |
| 6430 const DrawQuad* quad = frame.render_passes[0]->quad_list.front(); | 6430 const DrawQuad* quad = frame.render_passes[0]->quad_list.front(); |
| 6431 | 6431 |
| 6432 bool antialiased = | 6432 bool antialiased = |
| (...skipping 2042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8475 // surface. | 8475 // surface. |
| 8476 EXPECT_EQ(0, num_lost_surfaces_); | 8476 EXPECT_EQ(0, num_lost_surfaces_); |
| 8477 host_impl_->DidLoseOutputSurface(); | 8477 host_impl_->DidLoseOutputSurface(); |
| 8478 EXPECT_EQ(1, num_lost_surfaces_); | 8478 EXPECT_EQ(1, num_lost_surfaces_); |
| 8479 host_impl_->DidLoseOutputSurface(); | 8479 host_impl_->DidLoseOutputSurface(); |
| 8480 EXPECT_LE(1, num_lost_surfaces_); | 8480 EXPECT_LE(1, num_lost_surfaces_); |
| 8481 } | 8481 } |
| 8482 | 8482 |
| 8483 } // namespace | 8483 } // namespace |
| 8484 } // namespace cc | 8484 } // namespace cc |
| OLD | NEW |