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

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

Issue 1422563002: [Ozone] Enables overlay render format setting path and by default use UYVY (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/drm/gpu/mock_drm_device.h ('k') | ui/ozone/public/native_pixmap.h » ('j') | 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/drm/gpu/mock_drm_device.h" 5 #include "ui/ozone/platform/drm/gpu/mock_drm_device.h"
6 6
7 #include <drm_fourcc.h> 7 #include <drm_fourcc.h>
8 #include <xf86drm.h> 8 #include <xf86drm.h>
9 #include <xf86drmMode.h> 9 #include <xf86drmMode.h>
10 10
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 bool MockDrmDevice::DisableCrtc(uint32_t crtc_id) { 113 bool MockDrmDevice::DisableCrtc(uint32_t crtc_id) {
114 current_framebuffer_ = 0; 114 current_framebuffer_ = 0;
115 return true; 115 return true;
116 } 116 }
117 117
118 ScopedDrmConnectorPtr MockDrmDevice::GetConnector(uint32_t connector_id) { 118 ScopedDrmConnectorPtr MockDrmDevice::GetConnector(uint32_t connector_id) {
119 return ScopedDrmConnectorPtr(DrmAllocator<drmModeConnector>()); 119 return ScopedDrmConnectorPtr(DrmAllocator<drmModeConnector>());
120 } 120 }
121 121
122 bool MockDrmDevice::AddFramebuffer(uint32_t width, 122 bool MockDrmDevice::AddFramebuffer2(uint32_t width,
123 uint32_t height, 123 uint32_t height,
124 uint8_t depth, 124 uint32_t format,
125 uint8_t bpp, 125 uint32_t handles[4],
126 uint32_t stride, 126 uint32_t strides[4],
127 uint32_t handle, 127 uint32_t offsets[4],
128 uint32_t* framebuffer) { 128 uint32_t* framebuffer,
129 uint32_t flags) {
129 add_framebuffer_call_count_++; 130 add_framebuffer_call_count_++;
130 *framebuffer = add_framebuffer_call_count_; 131 *framebuffer = add_framebuffer_call_count_;
131 return add_framebuffer_expectation_; 132 return add_framebuffer_expectation_;
132 } 133 }
133 134
134 bool MockDrmDevice::RemoveFramebuffer(uint32_t framebuffer) { 135 bool MockDrmDevice::RemoveFramebuffer(uint32_t framebuffer) {
135 remove_framebuffer_call_count_++; 136 remove_framebuffer_call_count_++;
136 return true; 137 return true;
137 } 138 }
138 139
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 257
257 void MockDrmDevice::RunCallbacks() { 258 void MockDrmDevice::RunCallbacks() {
258 while (!callbacks_.empty()) { 259 while (!callbacks_.empty()) {
259 PageFlipCallback callback = callbacks_.front(); 260 PageFlipCallback callback = callbacks_.front();
260 callbacks_.pop(); 261 callbacks_.pop();
261 callback.Run(0, 0, 0); 262 callback.Run(0, 0, 0);
262 } 263 }
263 } 264 }
264 265
265 } // namespace ui 266 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/mock_drm_device.h ('k') | ui/ozone/public/native_pixmap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698