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/gpu/drm_console_buffer.h" | 5 #include "ui/ozone/platform/drm/gpu/drm_console_buffer.h" |
6 | 6 |
7 #include <sys/mman.h> | 7 #include <sys/mman.h> |
8 #include <xf86drmMode.h> | 8 #include <xf86drmMode.h> |
9 | 9 |
10 #include "third_party/skia/include/core/SkCanvas.h" | 10 #include "third_party/skia/include/core/SkCanvas.h" |
| 11 #include "ui/ozone/platform/drm/common/scoped_drm_types.h" |
11 #include "ui/ozone/platform/drm/gpu/drm_device.h" | 12 #include "ui/ozone/platform/drm/gpu/drm_device.h" |
12 #include "ui/ozone/platform/drm/gpu/scoped_drm_types.h" | |
13 | 13 |
14 namespace ui { | 14 namespace ui { |
15 | 15 |
16 DrmConsoleBuffer::DrmConsoleBuffer(const scoped_refptr<DrmDevice>& drm, | 16 DrmConsoleBuffer::DrmConsoleBuffer(const scoped_refptr<DrmDevice>& drm, |
17 uint32_t framebuffer) | 17 uint32_t framebuffer) |
18 : drm_(drm), | 18 : drm_(drm), |
19 handle_(0), | 19 handle_(0), |
20 framebuffer_(framebuffer), | 20 framebuffer_(framebuffer), |
21 mmap_base_(NULL), | 21 mmap_base_(NULL), |
22 mmap_size_(0) { | 22 mmap_size_(0) { |
(...skipping 27 matching lines...) Expand all Loading... |
50 | 50 |
51 surface_ = | 51 surface_ = |
52 skia::AdoptRef(SkSurface::NewRasterDirect(info, mmap_base_, stride_)); | 52 skia::AdoptRef(SkSurface::NewRasterDirect(info, mmap_base_, stride_)); |
53 if (!surface_) | 53 if (!surface_) |
54 return false; | 54 return false; |
55 | 55 |
56 return true; | 56 return true; |
57 } | 57 } |
58 | 58 |
59 } // namespace ui | 59 } // namespace ui |
OLD | NEW |