OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_TEST_CONTEXT_SUPPORT_H_ | 5 #ifndef CC_TEST_TEST_CONTEXT_SUPPORT_H_ |
6 #define CC_TEST_TEST_CONTEXT_SUPPORT_H_ | 6 #define CC_TEST_TEST_CONTEXT_SUPPORT_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 | 41 |
42 typedef base::Callback<void(int plane_z_order, | 42 typedef base::Callback<void(int plane_z_order, |
43 gfx::OverlayTransform plane_transform, | 43 gfx::OverlayTransform plane_transform, |
44 unsigned overlay_texture_id, | 44 unsigned overlay_texture_id, |
45 const gfx::Rect& display_bounds, | 45 const gfx::Rect& display_bounds, |
46 const gfx::RectF& crop_rect)> | 46 const gfx::RectF& crop_rect)> |
47 ScheduleOverlayPlaneCallback; | 47 ScheduleOverlayPlaneCallback; |
48 void SetScheduleOverlayPlaneCallback( | 48 void SetScheduleOverlayPlaneCallback( |
49 const ScheduleOverlayPlaneCallback& schedule_overlay_plane_callback); | 49 const ScheduleOverlayPlaneCallback& schedule_overlay_plane_callback); |
50 | 50 |
51 enum SwapType { | |
52 NO_SWAP, | |
53 SWAP, | |
54 PARTIAL_SWAP | |
55 }; | |
56 | |
57 SwapType last_swap_type() const { return last_swap_type_; } | |
58 gfx::Rect last_partial_swap_rect() const { | |
59 return last_partial_swap_rect_; | |
60 } | |
61 | |
62 private: | 51 private: |
63 std::vector<base::Closure> sync_point_callbacks_; | 52 std::vector<base::Closure> sync_point_callbacks_; |
64 SurfaceVisibleCallback set_visible_callback_; | 53 SurfaceVisibleCallback set_visible_callback_; |
65 ScheduleOverlayPlaneCallback schedule_overlay_plane_callback_; | 54 ScheduleOverlayPlaneCallback schedule_overlay_plane_callback_; |
66 | 55 |
67 SwapType last_swap_type_; | |
68 gfx::Rect last_partial_swap_rect_; | |
69 | |
70 base::WeakPtrFactory<TestContextSupport> weak_ptr_factory_; | 56 base::WeakPtrFactory<TestContextSupport> weak_ptr_factory_; |
71 | 57 |
72 DISALLOW_COPY_AND_ASSIGN(TestContextSupport); | 58 DISALLOW_COPY_AND_ASSIGN(TestContextSupport); |
73 }; | 59 }; |
74 | 60 |
75 } // namespace cc | 61 } // namespace cc |
76 | 62 |
77 #endif // CC_TEST_TEST_CONTEXT_SUPPORT_H_ | 63 #endif // CC_TEST_TEST_CONTEXT_SUPPORT_H_ |
OLD | NEW |