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 #ifndef CC_TEST_LAYER_TEST_COMMON_H_ | 5 #ifndef CC_TEST_LAYER_TEST_COMMON_H_ |
6 #define CC_TEST_LAYER_TEST_COMMON_H_ | 6 #define CC_TEST_LAYER_TEST_COMMON_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <utility> | 11 #include <utility> |
12 | 12 |
13 #include "cc/animation/animation_timeline.h" | 13 #include "cc/animation/animation_timeline.h" |
14 #include "cc/quads/render_pass.h" | 14 #include "cc/quads/render_pass.h" |
15 #include "cc/test/fake_layer_tree_host.h" | 15 #include "cc/test/fake_layer_tree_host.h" |
| 16 #include "cc/test/fake_layer_tree_host_client.h" |
16 #include "cc/test/test_task_graph_runner.h" | 17 #include "cc/test/test_task_graph_runner.h" |
17 #include "cc/trees/layer_tree_host_impl.h" | 18 #include "cc/trees/layer_tree_host_impl.h" |
18 | 19 |
19 #define EXPECT_SET_NEEDS_COMMIT(expect, code_to_test) \ | 20 #define EXPECT_SET_NEEDS_COMMIT(expect, code_to_test) \ |
20 do { \ | 21 do { \ |
21 EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times((expect)); \ | 22 EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times((expect)); \ |
22 code_to_test; \ | 23 code_to_test; \ |
23 Mock::VerifyAndClearExpectations(layer_tree_host_.get()); \ | 24 Mock::VerifyAndClearExpectations(layer_tree_host_.get()); \ |
24 } while (false) | 25 } while (false) |
25 | 26 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 std::unique_ptr<RenderPass> render_pass_; | 170 std::unique_ptr<RenderPass> render_pass_; |
170 scoped_refptr<AnimationTimeline> timeline_; | 171 scoped_refptr<AnimationTimeline> timeline_; |
171 scoped_refptr<AnimationTimeline> timeline_impl_; | 172 scoped_refptr<AnimationTimeline> timeline_impl_; |
172 int layer_impl_id_; | 173 int layer_impl_id_; |
173 }; | 174 }; |
174 }; | 175 }; |
175 | 176 |
176 } // namespace cc | 177 } // namespace cc |
177 | 178 |
178 #endif // CC_TEST_LAYER_TEST_COMMON_H_ | 179 #endif // CC_TEST_LAYER_TEST_COMMON_H_ |
OLD | NEW |