Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(900)

Side by Side Diff: ui/ozone/platform/dri/test/mock_dri_wrapper.h

Issue 847213002: [Ozone-DRI] Re-enable GBM surface mode support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update tests Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
11 #include "skia/ext/refptr.h" 11 #include "skia/ext/refptr.h"
12 #include "third_party/skia/include/core/SkSurface.h" 12 #include "third_party/skia/include/core/SkSurface.h"
13 #include "ui/ozone/platform/dri/dri_wrapper.h" 13 #include "ui/ozone/platform/dri/dri_wrapper.h"
14 14
15 namespace ui { 15 namespace ui {
16 16
17 class CrtcController; 17 class CrtcController;
18 18
19 // The real DriWrapper makes actual DRM calls which we can't use in unit tests. 19 // The real DriWrapper makes actual DRM calls which we can't use in unit tests.
20 class MockDriWrapper : public ui::DriWrapper { 20 class MockDriWrapper : public ui::DriWrapper {
21 public: 21 public:
22 MockDriWrapper(int fd); 22 MockDriWrapper(int fd);
23 MockDriWrapper(int fd, 23 MockDriWrapper(int fd,
24 bool software_mode, 24 bool use_sync_flips,
25 std::vector<uint32_t> crtcs, 25 std::vector<uint32_t> crtcs,
26 size_t planes_per_crtc); 26 size_t planes_per_crtc);
27 ~MockDriWrapper() override; 27 ~MockDriWrapper() override;
28 28
29 int get_get_crtc_call_count() const { return get_crtc_call_count_; } 29 int get_get_crtc_call_count() const { return get_crtc_call_count_; }
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 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 std::vector<skia::RefPtr<SkSurface> > buffers_; 121 std::vector<skia::RefPtr<SkSurface> > buffers_;
122 122
123 std::queue<PageFlipCallback> callbacks_; 123 std::queue<PageFlipCallback> callbacks_;
124 124
125 DISALLOW_COPY_AND_ASSIGN(MockDriWrapper); 125 DISALLOW_COPY_AND_ASSIGN(MockDriWrapper);
126 }; 126 };
127 127
128 } // namespace ui 128 } // namespace ui
129 129
130 #endif // UI_OZONE_PLATFORM_DRI_TEST_MOCK_DRI_WRAPPER_H_ 130 #endif // UI_OZONE_PLATFORM_DRI_TEST_MOCK_DRI_WRAPPER_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/ozone_platform_gbm.cc ('k') | ui/ozone/platform/dri/test/mock_dri_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698