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 5568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5579 std::unique_ptr<SwapPromise> swap_promise1( | 5579 std::unique_ptr<SwapPromise> swap_promise1( |
5580 new TestSwapPromise(&swap_promise_result_[1])); | 5580 new TestSwapPromise(&swap_promise_result_[1])); |
5581 layer_tree_host()->QueueSwapPromise(std::move(swap_promise1)); | 5581 layer_tree_host()->QueueSwapPromise(std::move(swap_promise1)); |
5582 layer_tree_host()->SetNeedsCommit(); | 5582 layer_tree_host()->SetNeedsCommit(); |
5583 layer_tree_host()->Composite(base::TimeTicks::Now()); | 5583 layer_tree_host()->Composite(base::TimeTicks::Now()); |
5584 | 5584 |
5585 // Fail to draw (not visible). | 5585 // Fail to draw (not visible). |
5586 std::unique_ptr<SwapPromise> swap_promise2( | 5586 std::unique_ptr<SwapPromise> swap_promise2( |
5587 new TestSwapPromise(&swap_promise_result_[2])); | 5587 new TestSwapPromise(&swap_promise_result_[2])); |
5588 layer_tree_host()->QueueSwapPromise(std::move(swap_promise2)); | 5588 layer_tree_host()->QueueSwapPromise(std::move(swap_promise2)); |
5589 layer_tree_host()->SetNeedsDisplayOnAllLayers(); | 5589 layer_tree()->SetNeedsDisplayOnAllLayers(); |
5590 layer_tree_host()->SetVisible(false); | 5590 layer_tree_host()->SetVisible(false); |
5591 layer_tree_host()->Composite(base::TimeTicks::Now()); | 5591 layer_tree_host()->Composite(base::TimeTicks::Now()); |
5592 | 5592 |
5593 EndTest(); | 5593 EndTest(); |
5594 } | 5594 } |
5595 | 5595 |
5596 void DidCommit() override { | 5596 void DidCommit() override { |
5597 commit_count_++; | 5597 commit_count_++; |
5598 ASSERT_LE(commit_count_, 3); | 5598 ASSERT_LE(commit_count_, 3); |
5599 } | 5599 } |
(...skipping 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7031 private: | 7031 private: |
7032 FakeContentLayerClient client_; | 7032 FakeContentLayerClient client_; |
7033 const gfx::Size viewport_size_; | 7033 const gfx::Size viewport_size_; |
7034 const gfx::Size large_image_size_; | 7034 const gfx::Size large_image_size_; |
7035 }; | 7035 }; |
7036 | 7036 |
7037 SINGLE_AND_MULTI_THREAD_TEST_F(GpuRasterizationSucceedsWithLargeImage); | 7037 SINGLE_AND_MULTI_THREAD_TEST_F(GpuRasterizationSucceedsWithLargeImage); |
7038 | 7038 |
7039 } // namespace | 7039 } // namespace |
7040 } // namespace cc | 7040 } // namespace cc |
OLD | NEW |