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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 24 matching lines...) Expand all Loading... |
35 void PartialSwapBuffers(const gfx::Rect& sub_buffer) override; | 35 void PartialSwapBuffers(const gfx::Rect& sub_buffer) override; |
36 void CommitOverlayPlanes() override; | 36 void CommitOverlayPlanes() override; |
37 void ScheduleOverlayPlane(int plane_z_order, | 37 void ScheduleOverlayPlane(int plane_z_order, |
38 gfx::OverlayTransform plane_transform, | 38 gfx::OverlayTransform plane_transform, |
39 unsigned overlay_texture_id, | 39 unsigned overlay_texture_id, |
40 const gfx::Rect& display_bounds, | 40 const gfx::Rect& display_bounds, |
41 const gfx::RectF& uv_rect) override; | 41 const gfx::RectF& uv_rect) override; |
42 uint64_t ShareGroupTracingGUID() const override; | 42 uint64_t ShareGroupTracingGUID() const override; |
43 void SetErrorMessageCallback( | 43 void SetErrorMessageCallback( |
44 const base::Callback<void(const char*, int32_t)>& callback) override; | 44 const base::Callback<void(const char*, int32_t)>& callback) override; |
45 void SetClientVisible(int client_id, bool is_visible) override; | |
46 bool AnyClientsVisible() const override; | |
47 | 45 |
48 void CallAllSyncPointCallbacks(); | 46 void CallAllSyncPointCallbacks(); |
49 | 47 |
50 typedef base::Callback<void(int plane_z_order, | 48 typedef base::Callback<void(int plane_z_order, |
51 gfx::OverlayTransform plane_transform, | 49 gfx::OverlayTransform plane_transform, |
52 unsigned overlay_texture_id, | 50 unsigned overlay_texture_id, |
53 const gfx::Rect& display_bounds, | 51 const gfx::Rect& display_bounds, |
54 const gfx::RectF& crop_rect)> | 52 const gfx::RectF& crop_rect)> |
55 ScheduleOverlayPlaneCallback; | 53 ScheduleOverlayPlaneCallback; |
56 void SetScheduleOverlayPlaneCallback( | 54 void SetScheduleOverlayPlaneCallback( |
57 const ScheduleOverlayPlaneCallback& schedule_overlay_plane_callback); | 55 const ScheduleOverlayPlaneCallback& schedule_overlay_plane_callback); |
58 | 56 |
59 // If set true, callbacks triggering will be in a reverse order as SignalQuery | 57 // If set true, callbacks triggering will be in a reverse order as SignalQuery |
60 // calls. | 58 // calls. |
61 void set_out_of_order_callbacks(bool out_of_order_callbacks) { | 59 void set_out_of_order_callbacks(bool out_of_order_callbacks) { |
62 out_of_order_callbacks_ = out_of_order_callbacks; | 60 out_of_order_callbacks_ = out_of_order_callbacks; |
63 } | 61 } |
64 | 62 |
65 private: | 63 private: |
66 std::vector<base::Closure> sync_point_callbacks_; | 64 std::vector<base::Closure> sync_point_callbacks_; |
67 ScheduleOverlayPlaneCallback schedule_overlay_plane_callback_; | 65 ScheduleOverlayPlaneCallback schedule_overlay_plane_callback_; |
68 bool out_of_order_callbacks_; | 66 bool out_of_order_callbacks_; |
69 std::set<int> visible_clients_; | |
70 | 67 |
71 base::WeakPtrFactory<TestContextSupport> weak_ptr_factory_; | 68 base::WeakPtrFactory<TestContextSupport> weak_ptr_factory_; |
72 | 69 |
73 DISALLOW_COPY_AND_ASSIGN(TestContextSupport); | 70 DISALLOW_COPY_AND_ASSIGN(TestContextSupport); |
74 }; | 71 }; |
75 | 72 |
76 } // namespace cc | 73 } // namespace cc |
77 | 74 |
78 #endif // CC_TEST_TEST_CONTEXT_SUPPORT_H_ | 75 #endif // CC_TEST_TEST_CONTEXT_SUPPORT_H_ |
OLD | NEW |