| 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 6435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6446 content_layer->SetDrawsContent(true); | 6446 content_layer->SetDrawsContent(true); |
| 6447 | 6447 |
| 6448 root->SetBounds(root_size); | 6448 root->SetBounds(root_size); |
| 6449 | 6449 |
| 6450 gfx::ScrollOffset scroll_offset(100000, 0); | 6450 gfx::ScrollOffset scroll_offset(100000, 0); |
| 6451 scrolling_layer->SetScrollClipLayer(root->id()); | 6451 scrolling_layer->SetScrollClipLayer(root->id()); |
| 6452 scrolling_layer->PushScrollOffsetFromMainThread(scroll_offset); | 6452 scrolling_layer->PushScrollOffsetFromMainThread(scroll_offset); |
| 6453 | 6453 |
| 6454 host_impl_->ActivateSyncTree(); | 6454 host_impl_->ActivateSyncTree(); |
| 6455 | 6455 |
| 6456 host_impl_->active_tree()->UpdateDrawProperties(); | 6456 bool update_lcd_text = false; |
| 6457 host_impl_->active_tree()->UpdateDrawProperties(update_lcd_text); |
| 6457 ASSERT_EQ(1u, host_impl_->active_tree()->RenderSurfaceLayerList().size()); | 6458 ASSERT_EQ(1u, host_impl_->active_tree()->RenderSurfaceLayerList().size()); |
| 6458 | 6459 |
| 6459 LayerTreeHostImpl::FrameData frame; | 6460 LayerTreeHostImpl::FrameData frame; |
| 6460 EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame)); | 6461 EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame)); |
| 6461 | 6462 |
| 6462 ASSERT_EQ(1u, frame.render_passes.size()); | 6463 ASSERT_EQ(1u, frame.render_passes.size()); |
| 6463 ASSERT_LE(1u, frame.render_passes[0]->quad_list.size()); | 6464 ASSERT_LE(1u, frame.render_passes[0]->quad_list.size()); |
| 6464 const DrawQuad* quad = frame.render_passes[0]->quad_list.front(); | 6465 const DrawQuad* quad = frame.render_passes[0]->quad_list.front(); |
| 6465 | 6466 |
| 6466 bool antialiased = | 6467 bool antialiased = |
| (...skipping 1949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8416 // surface. | 8417 // surface. |
| 8417 EXPECT_EQ(0, num_lost_surfaces_); | 8418 EXPECT_EQ(0, num_lost_surfaces_); |
| 8418 host_impl_->DidLoseOutputSurface(); | 8419 host_impl_->DidLoseOutputSurface(); |
| 8419 EXPECT_EQ(1, num_lost_surfaces_); | 8420 EXPECT_EQ(1, num_lost_surfaces_); |
| 8420 host_impl_->DidLoseOutputSurface(); | 8421 host_impl_->DidLoseOutputSurface(); |
| 8421 EXPECT_LE(1, num_lost_surfaces_); | 8422 EXPECT_LE(1, num_lost_surfaces_); |
| 8422 } | 8423 } |
| 8423 | 8424 |
| 8424 } // namespace | 8425 } // namespace |
| 8425 } // namespace cc | 8426 } // namespace cc |
| OLD | NEW |