| 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.h" | 5 #include "cc/trees/layer_tree_host.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 6592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6603 content_layer->SetBounds(layer_size); | 6603 content_layer->SetBounds(layer_size); |
| 6604 content_layer->SetPosition(gfx::PointF() - | 6604 content_layer->SetPosition(gfx::PointF() - |
| 6605 clipping_origin.OffsetFromOrigin()); | 6605 clipping_origin.OffsetFromOrigin()); |
| 6606 | 6606 |
| 6607 gfx::Size child_size(50, 50); | 6607 gfx::Size child_size(50, 50); |
| 6608 content_child_layer->SetBounds(child_size); | 6608 content_child_layer->SetBounds(child_size); |
| 6609 content_child_layer->SetPosition(gfx::PointF(20.f, 0.f)); | 6609 content_child_layer->SetPosition(gfx::PointF(20.f, 0.f)); |
| 6610 | 6610 |
| 6611 gfx::Size mask_size(100, 100); | 6611 gfx::Size mask_size(100, 100); |
| 6612 mask_layer->SetBounds(mask_size); | 6612 mask_layer->SetBounds(mask_size); |
| 6613 mask_layer->SetIsMask(true); | 6613 mask_layer->SetLayerMaskType(Layer::LayerMaskType::MULTI_TEXTURE_MASK); |
| 6614 | 6614 |
| 6615 layer_tree_host()->SetRootLayer(root); | 6615 layer_tree_host()->SetRootLayer(root); |
| 6616 LayerTreeTest::SetupTree(); | 6616 LayerTreeTest::SetupTree(); |
| 6617 client_.set_bounds(root->bounds()); | 6617 client_.set_bounds(root->bounds()); |
| 6618 } | 6618 } |
| 6619 | 6619 |
| 6620 void BeginTest() override { PostSetNeedsCommitToMainThread(); } | 6620 void BeginTest() override { PostSetNeedsCommitToMainThread(); } |
| 6621 | 6621 |
| 6622 DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, | 6622 DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, |
| 6623 LayerTreeHostImpl::FrameData* frame_data, | 6623 LayerTreeHostImpl::FrameData* frame_data, |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6688 | 6688 |
| 6689 gfx::Size scaling_layer_size(50, 50); | 6689 gfx::Size scaling_layer_size(50, 50); |
| 6690 scaling_layer->SetBounds(scaling_layer_size); | 6690 scaling_layer->SetBounds(scaling_layer_size); |
| 6691 gfx::Transform scale; | 6691 gfx::Transform scale; |
| 6692 scale.Scale(2.f, 2.f); | 6692 scale.Scale(2.f, 2.f); |
| 6693 scaling_layer->SetTransform(scale); | 6693 scaling_layer->SetTransform(scale); |
| 6694 | 6694 |
| 6695 content_layer->SetBounds(scaling_layer_size); | 6695 content_layer->SetBounds(scaling_layer_size); |
| 6696 | 6696 |
| 6697 mask_layer->SetBounds(scaling_layer_size); | 6697 mask_layer->SetBounds(scaling_layer_size); |
| 6698 mask_layer->SetIsMask(true); | 6698 mask_layer->SetLayerMaskType(Layer::LayerMaskType::MULTI_TEXTURE_MASK); |
| 6699 | 6699 |
| 6700 layer_tree_host()->SetRootLayer(root); | 6700 layer_tree_host()->SetRootLayer(root); |
| 6701 LayerTreeTest::SetupTree(); | 6701 LayerTreeTest::SetupTree(); |
| 6702 client_.set_bounds(root->bounds()); | 6702 client_.set_bounds(root->bounds()); |
| 6703 } | 6703 } |
| 6704 | 6704 |
| 6705 void BeginTest() override { PostSetNeedsCommitToMainThread(); } | 6705 void BeginTest() override { PostSetNeedsCommitToMainThread(); } |
| 6706 | 6706 |
| 6707 DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, | 6707 DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, |
| 6708 LayerTreeHostImpl::FrameData* frame_data, | 6708 LayerTreeHostImpl::FrameData* frame_data, |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6777 content_layer->SetMaskLayer(mask_layer.get()); | 6777 content_layer->SetMaskLayer(mask_layer.get()); |
| 6778 | 6778 |
| 6779 gfx::Size root_size(100, 100); | 6779 gfx::Size root_size(100, 100); |
| 6780 root->SetBounds(root_size); | 6780 root->SetBounds(root_size); |
| 6781 | 6781 |
| 6782 gfx::Size layer_size(50, 50); | 6782 gfx::Size layer_size(50, 50); |
| 6783 content_layer->SetBounds(layer_size); | 6783 content_layer->SetBounds(layer_size); |
| 6784 | 6784 |
| 6785 gfx::Size mask_size(100, 100); | 6785 gfx::Size mask_size(100, 100); |
| 6786 mask_layer->SetBounds(mask_size); | 6786 mask_layer->SetBounds(mask_size); |
| 6787 mask_layer->SetIsMask(true); | 6787 mask_layer->SetLayerMaskType(Layer::LayerMaskType::MULTI_TEXTURE_MASK); |
| 6788 | 6788 |
| 6789 layer_tree_host()->SetRootLayer(root); | 6789 layer_tree_host()->SetRootLayer(root); |
| 6790 LayerTreeTest::SetupTree(); | 6790 LayerTreeTest::SetupTree(); |
| 6791 client_.set_bounds(root->bounds()); | 6791 client_.set_bounds(root->bounds()); |
| 6792 } | 6792 } |
| 6793 | 6793 |
| 6794 void BeginTest() override { PostSetNeedsCommitToMainThread(); } | 6794 void BeginTest() override { PostSetNeedsCommitToMainThread(); } |
| 6795 | 6795 |
| 6796 DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, | 6796 DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, |
| 6797 LayerTreeHostImpl::FrameData* frame_data, | 6797 LayerTreeHostImpl::FrameData* frame_data, |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7117 EndTest(); | 7117 EndTest(); |
| 7118 } | 7118 } |
| 7119 | 7119 |
| 7120 void AfterTest() override {} | 7120 void AfterTest() override {} |
| 7121 }; | 7121 }; |
| 7122 | 7122 |
| 7123 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestSubmitFrameResources); | 7123 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestSubmitFrameResources); |
| 7124 | 7124 |
| 7125 } // namespace | 7125 } // namespace |
| 7126 } // namespace cc | 7126 } // namespace cc |
| OLD | NEW |