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

Side by Side Diff: ui/ozone/platform/drm/gpu/mock_drm_device.h

Issue 1855273002: Update new Surface callsites (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: software_output_device was indirectly including skia::refptr, switch to sk_sp<> Created 4 years, 8 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_DRM_GPU_MOCK_DRM_DEVICE_H_ 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_MOCK_DRM_DEVICE_H_
6 #define UI_OZONE_PLATFORM_DRM_GPU_MOCK_DRM_DEVICE_H_ 6 #define UI_OZONE_PLATFORM_DRM_GPU_MOCK_DRM_DEVICE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 void set_page_flip_expectation(bool state) { page_flip_expectation_ = state; } 43 void set_page_flip_expectation(bool state) { page_flip_expectation_ = state; }
44 void set_add_framebuffer_expectation(bool state) { 44 void set_add_framebuffer_expectation(bool state) {
45 add_framebuffer_expectation_ = state; 45 add_framebuffer_expectation_ = state;
46 } 46 }
47 void set_create_dumb_buffer_expectation(bool state) { 47 void set_create_dumb_buffer_expectation(bool state) {
48 create_dumb_buffer_expectation_ = state; 48 create_dumb_buffer_expectation_ = state;
49 } 49 }
50 50
51 uint32_t current_framebuffer() const { return current_framebuffer_; } 51 uint32_t current_framebuffer() const { return current_framebuffer_; }
52 52
53 const std::vector<skia::RefPtr<SkSurface>> buffers() const { 53 const std::vector<sk_sp<SkSurface>> buffers() const { return buffers_; }
54 return buffers_;
55 }
56 54
57 uint32_t get_cursor_handle_for_crtc(uint32_t crtc) const { 55 uint32_t get_cursor_handle_for_crtc(uint32_t crtc) const {
58 const auto it = crtc_cursor_map_.find(crtc); 56 const auto it = crtc_cursor_map_.find(crtc);
59 return it != crtc_cursor_map_.end() ? it->second : 0; 57 return it != crtc_cursor_map_.end() ? it->second : 0;
60 } 58 }
61 59
62 void RunCallbacks(); 60 void RunCallbacks();
63 61
64 // DrmDevice: 62 // DrmDevice:
65 ScopedDrmCrtcPtr GetCrtc(uint32_t crtc_id) override; 63 ScopedDrmCrtcPtr GetCrtc(uint32_t crtc_id) override;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 132
135 bool set_crtc_expectation_; 133 bool set_crtc_expectation_;
136 bool add_framebuffer_expectation_; 134 bool add_framebuffer_expectation_;
137 bool page_flip_expectation_; 135 bool page_flip_expectation_;
138 bool create_dumb_buffer_expectation_; 136 bool create_dumb_buffer_expectation_;
139 137
140 bool use_sync_flips_; 138 bool use_sync_flips_;
141 139
142 uint32_t current_framebuffer_; 140 uint32_t current_framebuffer_;
143 141
144 std::vector<skia::RefPtr<SkSurface>> buffers_; 142 std::vector<sk_sp<SkSurface>> buffers_;
145 143
146 std::map<uint32_t, uint32_t> crtc_cursor_map_; 144 std::map<uint32_t, uint32_t> crtc_cursor_map_;
147 145
148 std::queue<PageFlipCallback> callbacks_; 146 std::queue<PageFlipCallback> callbacks_;
149 147
150 DISALLOW_COPY_AND_ASSIGN(MockDrmDevice); 148 DISALLOW_COPY_AND_ASSIGN(MockDrmDevice);
151 }; 149 };
152 150
153 } // namespace ui 151 } // namespace ui
154 152
155 #endif // UI_OZONE_PLATFORM_DRM_GPU_MOCK_DRM_DEVICE_H_ 153 #endif // UI_OZONE_PLATFORM_DRM_GPU_MOCK_DRM_DEVICE_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_window_unittest.cc ('k') | ui/ozone/platform/drm/gpu/mock_drm_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698