OLD | NEW |
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/common/drm_util.h" | 5 #include "ui/ozone/platform/drm/common/drm_util.h" |
6 | 6 |
7 #include <drm_fourcc.h> | 7 #include <drm_fourcc.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <stdlib.h> | 9 #include <stdlib.h> |
10 #include <sys/mman.h> | 10 #include <sys/mman.h> |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 } | 189 } |
190 } | 190 } |
191 return false; | 191 return false; |
192 } | 192 } |
193 | 193 |
194 } // namespace | 194 } // namespace |
195 | 195 |
196 gfx::Size GetMaximumCursorSize(int fd) { | 196 gfx::Size GetMaximumCursorSize(int fd) { |
197 uint64_t width = 0, height = 0; | 197 uint64_t width = 0, height = 0; |
198 if (drmGetCap(fd, DRM_CAP_CURSOR_WIDTH, &width)) { | 198 if (drmGetCap(fd, DRM_CAP_CURSOR_WIDTH, &width)) { |
199 PLOG(WARNING) << "Unable to get cursor width capability"; | 199 VPLOG(1) << "Unable to get cursor width capability"; |
200 return gfx::Size(kDefaultCursorWidth, kDefaultCursorHeight); | 200 return gfx::Size(kDefaultCursorWidth, kDefaultCursorHeight); |
201 } | 201 } |
202 if (drmGetCap(fd, DRM_CAP_CURSOR_HEIGHT, &height)) { | 202 if (drmGetCap(fd, DRM_CAP_CURSOR_HEIGHT, &height)) { |
203 PLOG(WARNING) << "Unable to get cursor height capability"; | 203 VPLOG(1) << "Unable to get cursor height capability"; |
204 return gfx::Size(kDefaultCursorWidth, kDefaultCursorHeight); | 204 return gfx::Size(kDefaultCursorWidth, kDefaultCursorHeight); |
205 } | 205 } |
206 | 206 |
207 return gfx::Size(width, height); | 207 return gfx::Size(width, height); |
208 } | 208 } |
209 | 209 |
210 HardwareDisplayControllerInfo::HardwareDisplayControllerInfo( | 210 HardwareDisplayControllerInfo::HardwareDisplayControllerInfo( |
211 ScopedDrmConnectorPtr connector, | 211 ScopedDrmConnectorPtr connector, |
212 ScopedDrmCrtcPtr crtc, | 212 ScopedDrmCrtcPtr crtc, |
213 size_t index) | 213 size_t index) |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 case gfx::BufferFormat::BGR_565: | 385 case gfx::BufferFormat::BGR_565: |
386 return DRM_FORMAT_RGB565; | 386 return DRM_FORMAT_RGB565; |
387 case gfx::BufferFormat::UYVY_422: | 387 case gfx::BufferFormat::UYVY_422: |
388 return DRM_FORMAT_UYVY; | 388 return DRM_FORMAT_UYVY; |
389 default: | 389 default: |
390 NOTREACHED(); | 390 NOTREACHED(); |
391 return 0; | 391 return 0; |
392 } | 392 } |
393 } | 393 } |
394 } // namespace ui | 394 } // namespace ui |
OLD | NEW |