| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <cmath> | 10 #include <cmath> |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 using ::testing::AtLeast; | 89 using ::testing::AtLeast; |
| 90 using ::testing::_; | 90 using ::testing::_; |
| 91 using media::VideoFrame; | 91 using media::VideoFrame; |
| 92 | 92 |
| 93 namespace cc { | 93 namespace cc { |
| 94 namespace { | 94 namespace { |
| 95 | 95 |
| 96 struct TestFrameData : public LayerTreeHostImpl::FrameData { | 96 struct TestFrameData : public LayerTreeHostImpl::FrameData { |
| 97 TestFrameData() { | 97 TestFrameData() { |
| 98 // Set ack to something valid, so DCHECKs don't complain. | 98 // Set ack to something valid, so DCHECKs don't complain. |
| 99 begin_frame_ack = BeginFrameAck(0, 1, 1, 0, true); | 99 begin_frame_ack = BeginFrameAck(0, 1, 1, true); |
| 100 } | 100 } |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 class LayerTreeHostImplTest : public testing::Test, | 103 class LayerTreeHostImplTest : public testing::Test, |
| 104 public LayerTreeHostImplClient { | 104 public LayerTreeHostImplClient { |
| 105 public: | 105 public: |
| 106 LayerTreeHostImplTest() | 106 LayerTreeHostImplTest() |
| 107 : task_runner_provider_(base::ThreadTaskRunnerHandle::Get()), | 107 : task_runner_provider_(base::ThreadTaskRunnerHandle::Get()), |
| 108 always_main_thread_blocked_(&task_runner_provider_), | 108 always_main_thread_blocked_(&task_runner_provider_), |
| 109 on_can_draw_state_changed_called_(false), | 109 on_can_draw_state_changed_called_(false), |
| (...skipping 11984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12094 else | 12094 else |
| 12095 EXPECT_FALSE(tile->HasRasterTask()); | 12095 EXPECT_FALSE(tile->HasRasterTask()); |
| 12096 } | 12096 } |
| 12097 Region expected_invalidation( | 12097 Region expected_invalidation( |
| 12098 raster_source->GetRectForImage(checkerable_image->uniqueID())); | 12098 raster_source->GetRectForImage(checkerable_image->uniqueID())); |
| 12099 EXPECT_EQ(expected_invalidation, *(root->GetPendingInvalidation())); | 12099 EXPECT_EQ(expected_invalidation, *(root->GetPendingInvalidation())); |
| 12100 } | 12100 } |
| 12101 | 12101 |
| 12102 } // namespace | 12102 } // namespace |
| 12103 } // namespace cc | 12103 } // namespace cc |
| OLD | NEW |