| 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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 : public LayerTreeHostContextTestLostContextSucceeds { | 558 : public LayerTreeHostContextTestLostContextSucceeds { |
| 559 public: | 559 public: |
| 560 void SetupTree() override { | 560 void SetupTree() override { |
| 561 root_ = Layer::Create(layer_settings()); | 561 root_ = Layer::Create(layer_settings()); |
| 562 root_->SetBounds(gfx::Size(10, 10)); | 562 root_->SetBounds(gfx::Size(10, 10)); |
| 563 root_->SetIsDrawable(true); | 563 root_->SetIsDrawable(true); |
| 564 | 564 |
| 565 // Paint non-solid color. | 565 // Paint non-solid color. |
| 566 SkPaint paint; | 566 SkPaint paint; |
| 567 paint.setColor(SkColorSetARGB(100, 80, 200, 200)); | 567 paint.setColor(SkColorSetARGB(100, 80, 200, 200)); |
| 568 client_.add_draw_rect(gfx::Rect(0, 0, 5, 5), paint); | 568 client_.add_draw_rect(gfx::Rect(5, 5), paint); |
| 569 | 569 |
| 570 layer_ = FakePictureLayer::Create(layer_settings(), &client_); | 570 layer_ = FakePictureLayer::Create(layer_settings(), &client_); |
| 571 layer_->SetBounds(gfx::Size(10, 10)); | 571 layer_->SetBounds(gfx::Size(10, 10)); |
| 572 layer_->SetIsDrawable(true); | 572 layer_->SetIsDrawable(true); |
| 573 | 573 |
| 574 root_->AddChild(layer_); | 574 root_->AddChild(layer_); |
| 575 | 575 |
| 576 layer_tree_host()->SetRootLayer(root_); | 576 layer_tree_host()->SetRootLayer(root_); |
| 577 LayerTreeHostContextTest::SetupTree(); | 577 LayerTreeHostContextTest::SetupTree(); |
| 578 } | 578 } |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 LayerTreeHostContextTestLostContextAndEvictTextures() | 636 LayerTreeHostContextTestLostContextAndEvictTextures() |
| 637 : LayerTreeHostContextTest(), | 637 : LayerTreeHostContextTest(), |
| 638 impl_host_(0), | 638 impl_host_(0), |
| 639 num_commits_(0), | 639 num_commits_(0), |
| 640 lost_context_(false) {} | 640 lost_context_(false) {} |
| 641 | 641 |
| 642 void SetupTree() override { | 642 void SetupTree() override { |
| 643 // Paint non-solid color. | 643 // Paint non-solid color. |
| 644 SkPaint paint; | 644 SkPaint paint; |
| 645 paint.setColor(SkColorSetARGB(100, 80, 200, 200)); | 645 paint.setColor(SkColorSetARGB(100, 80, 200, 200)); |
| 646 client_.add_draw_rect(gfx::Rect(0, 0, 5, 5), paint); | 646 client_.add_draw_rect(gfx::Rect(5, 5), paint); |
| 647 | 647 |
| 648 scoped_refptr<FakePictureLayer> picture_layer = | 648 scoped_refptr<FakePictureLayer> picture_layer = |
| 649 FakePictureLayer::Create(layer_settings(), &client_); | 649 FakePictureLayer::Create(layer_settings(), &client_); |
| 650 picture_layer->SetBounds(gfx::Size(10, 20)); | 650 picture_layer->SetBounds(gfx::Size(10, 20)); |
| 651 layer_tree_host()->SetRootLayer(picture_layer); | 651 layer_tree_host()->SetRootLayer(picture_layer); |
| 652 | 652 |
| 653 LayerTreeHostContextTest::SetupTree(); | 653 LayerTreeHostContextTest::SetupTree(); |
| 654 } | 654 } |
| 655 | 655 |
| 656 void BeginTest() override { PostSetNeedsCommitToMainThread(); } | 656 void BeginTest() override { PostSetNeedsCommitToMainThread(); } |
| (...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1562 void AfterTest() override {} | 1562 void AfterTest() override {} |
| 1563 | 1563 |
| 1564 bool deferred_; | 1564 bool deferred_; |
| 1565 }; | 1565 }; |
| 1566 | 1566 |
| 1567 SINGLE_AND_MULTI_THREAD_TEST_F( | 1567 SINGLE_AND_MULTI_THREAD_TEST_F( |
| 1568 LayerTreeHostContextTestLoseAfterSendingBeginMainFrame); | 1568 LayerTreeHostContextTestLoseAfterSendingBeginMainFrame); |
| 1569 | 1569 |
| 1570 } // namespace | 1570 } // namespace |
| 1571 } // namespace cc | 1571 } // namespace cc |
| OLD | NEW |