OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 UI_OZONE_PLATFORM_DRI_TEST_MOCK_DRI_WRAPPER_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRI_TEST_MOCK_DRI_WRAPPER_H_ |
6 #define UI_OZONE_PLATFORM_DRI_TEST_MOCK_DRI_WRAPPER_H_ | 6 #define UI_OZONE_PLATFORM_DRI_TEST_MOCK_DRI_WRAPPER_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 int get_set_crtc_call_count() const { return set_crtc_call_count_; } | 30 int get_set_crtc_call_count() const { return set_crtc_call_count_; } |
31 int get_restore_crtc_call_count() const { return restore_crtc_call_count_; } | 31 int get_restore_crtc_call_count() const { return restore_crtc_call_count_; } |
32 int get_add_framebuffer_call_count() const { | 32 int get_add_framebuffer_call_count() const { |
33 return add_framebuffer_call_count_; | 33 return add_framebuffer_call_count_; |
34 } | 34 } |
35 int get_remove_framebuffer_call_count() const { | 35 int get_remove_framebuffer_call_count() const { |
36 return remove_framebuffer_call_count_; | 36 return remove_framebuffer_call_count_; |
37 } | 37 } |
38 int get_page_flip_call_count() const { return page_flip_call_count_; } | 38 int get_page_flip_call_count() const { return page_flip_call_count_; } |
39 int get_overlay_flip_call_count() const { return overlay_flip_call_count_; } | 39 int get_overlay_flip_call_count() const { return overlay_flip_call_count_; } |
| 40 int get_overlay_clear_call_count() const { return overlay_clear_call_count_; } |
40 void fail_init() { fd_ = -1; } | 41 void fail_init() { fd_ = -1; } |
41 void set_set_crtc_expectation(bool state) { set_crtc_expectation_ = state; } | 42 void set_set_crtc_expectation(bool state) { set_crtc_expectation_ = state; } |
42 void set_page_flip_expectation(bool state) { page_flip_expectation_ = state; } | 43 void set_page_flip_expectation(bool state) { page_flip_expectation_ = state; } |
43 void set_add_framebuffer_expectation(bool state) { | 44 void set_add_framebuffer_expectation(bool state) { |
44 add_framebuffer_expectation_ = state; | 45 add_framebuffer_expectation_ = state; |
45 } | 46 } |
46 void set_create_dumb_buffer_expectation(bool state) { | 47 void set_create_dumb_buffer_expectation(bool state) { |
47 create_dumb_buffer_expectation_ = state; | 48 create_dumb_buffer_expectation_ = state; |
48 } | 49 } |
49 | 50 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 void* pixels) override; | 104 void* pixels) override; |
104 | 105 |
105 private: | 106 private: |
106 int get_crtc_call_count_; | 107 int get_crtc_call_count_; |
107 int set_crtc_call_count_; | 108 int set_crtc_call_count_; |
108 int restore_crtc_call_count_; | 109 int restore_crtc_call_count_; |
109 int add_framebuffer_call_count_; | 110 int add_framebuffer_call_count_; |
110 int remove_framebuffer_call_count_; | 111 int remove_framebuffer_call_count_; |
111 int page_flip_call_count_; | 112 int page_flip_call_count_; |
112 int overlay_flip_call_count_; | 113 int overlay_flip_call_count_; |
| 114 int overlay_clear_call_count_; |
113 | 115 |
114 bool set_crtc_expectation_; | 116 bool set_crtc_expectation_; |
115 bool add_framebuffer_expectation_; | 117 bool add_framebuffer_expectation_; |
116 bool page_flip_expectation_; | 118 bool page_flip_expectation_; |
117 bool create_dumb_buffer_expectation_; | 119 bool create_dumb_buffer_expectation_; |
118 | 120 |
119 uint32_t current_framebuffer_; | 121 uint32_t current_framebuffer_; |
120 | 122 |
121 std::vector<skia::RefPtr<SkSurface> > buffers_; | 123 std::vector<skia::RefPtr<SkSurface> > buffers_; |
122 | 124 |
123 std::queue<PageFlipCallback> callbacks_; | 125 std::queue<PageFlipCallback> callbacks_; |
124 | 126 |
125 DISALLOW_COPY_AND_ASSIGN(MockDriWrapper); | 127 DISALLOW_COPY_AND_ASSIGN(MockDriWrapper); |
126 }; | 128 }; |
127 | 129 |
128 } // namespace ui | 130 } // namespace ui |
129 | 131 |
130 #endif // UI_OZONE_PLATFORM_DRI_TEST_MOCK_DRI_WRAPPER_H_ | 132 #endif // UI_OZONE_PLATFORM_DRI_TEST_MOCK_DRI_WRAPPER_H_ |
OLD | NEW |