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

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

Issue 2627193003: ozone: Allocate scanout buffers according to KMS modifiers. (Closed)
Patch Set: Created 3 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 #include "ui/ozone/platform/drm/gpu/mock_drm_device.h" 5 #include "ui/ozone/platform/drm/gpu/mock_drm_device.h"
6 6
7 #include <xf86drm.h> 7 #include <xf86drm.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 ScopedDrmConnectorPtr MockDrmDevice::GetConnector(uint32_t connector_id) { 95 ScopedDrmConnectorPtr MockDrmDevice::GetConnector(uint32_t connector_id) {
96 return ScopedDrmConnectorPtr(DrmAllocator<drmModeConnector>()); 96 return ScopedDrmConnectorPtr(DrmAllocator<drmModeConnector>());
97 } 97 }
98 98
99 bool MockDrmDevice::AddFramebuffer2(uint32_t width, 99 bool MockDrmDevice::AddFramebuffer2(uint32_t width,
100 uint32_t height, 100 uint32_t height,
101 uint32_t format, 101 uint32_t format,
102 uint32_t handles[4], 102 uint32_t handles[4],
103 uint32_t strides[4], 103 uint32_t strides[4],
104 uint32_t offsets[4], 104 uint32_t offsets[4],
105 uint64_t modifiers[4],
105 uint32_t* framebuffer, 106 uint32_t* framebuffer,
106 uint32_t flags) { 107 uint32_t flags) {
107 add_framebuffer_call_count_++; 108 add_framebuffer_call_count_++;
108 *framebuffer = add_framebuffer_call_count_; 109 *framebuffer = add_framebuffer_call_count_;
109 return add_framebuffer_expectation_; 110 return add_framebuffer_expectation_;
110 } 111 }
111 112
112 bool MockDrmDevice::RemoveFramebuffer(uint32_t framebuffer) { 113 bool MockDrmDevice::RemoveFramebuffer(uint32_t framebuffer) {
113 remove_framebuffer_call_count_++; 114 remove_framebuffer_call_count_++;
114 return true; 115 return true;
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 239
239 void MockDrmDevice::RunCallbacks() { 240 void MockDrmDevice::RunCallbacks() {
240 while (!callbacks_.empty()) { 241 while (!callbacks_.empty()) {
241 PageFlipCallback callback = callbacks_.front(); 242 PageFlipCallback callback = callbacks_.front();
242 callbacks_.pop(); 243 callbacks_.pop();
243 callback.Run(0, 0, 0); 244 callback.Run(0, 0, 0);
244 } 245 }
245 } 246 }
246 247
247 } // namespace ui 248 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/mock_drm_device.h ('k') | ui/ozone/platform/drm/gpu/mock_hardware_display_plane_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698