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

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

Issue 960273003: ozone: dri: add synchronous SwapBuffers support on surfaceless (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 5 years, 9 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
« no previous file with comments | « ui/ozone/platform/dri/test/mock_dri_wrapper.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ui/ozone/platform/dri/test/mock_dri_wrapper.h" 5 #include "ui/ozone/platform/dri/test/mock_dri_wrapper.h"
6 6
7 #include <xf86drm.h> 7 #include <xf86drm.h>
8 #include <xf86drmMode.h> 8 #include <xf86drmMode.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 remove_framebuffer_call_count_++; 126 remove_framebuffer_call_count_++;
127 return true; 127 return true;
128 } 128 }
129 129
130 ScopedDrmFramebufferPtr MockDriWrapper::GetFramebuffer(uint32_t framebuffer) { 130 ScopedDrmFramebufferPtr MockDriWrapper::GetFramebuffer(uint32_t framebuffer) {
131 return ScopedDrmFramebufferPtr(); 131 return ScopedDrmFramebufferPtr();
132 } 132 }
133 133
134 bool MockDriWrapper::PageFlip(uint32_t crtc_id, 134 bool MockDriWrapper::PageFlip(uint32_t crtc_id,
135 uint32_t framebuffer, 135 uint32_t framebuffer,
136 bool is_sync,
136 const PageFlipCallback& callback) { 137 const PageFlipCallback& callback) {
137 page_flip_call_count_++; 138 page_flip_call_count_++;
138 current_framebuffer_ = framebuffer; 139 current_framebuffer_ = framebuffer;
139 if (page_flip_expectation_) { 140 if (page_flip_expectation_) {
140 if (use_sync_flips_) 141 if (use_sync_flips_)
141 callback.Run(0, 0, 0); 142 callback.Run(0, 0, 0);
142 else 143 else
143 callbacks_.push(callback); 144 callbacks_.push(callback);
144 } 145 }
145 146
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 215
215 void MockDriWrapper::RunCallbacks() { 216 void MockDriWrapper::RunCallbacks() {
216 while (!callbacks_.empty()) { 217 while (!callbacks_.empty()) {
217 PageFlipCallback callback = callbacks_.front(); 218 PageFlipCallback callback = callbacks_.front();
218 callbacks_.pop(); 219 callbacks_.pop();
219 callback.Run(0, 0, 0); 220 callback.Run(0, 0, 0);
220 } 221 }
221 } 222 }
222 223
223 } // namespace ui 224 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/test/mock_dri_wrapper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698