| 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 #ifndef UI_OZONE_PLATFORM_DRM_GPU_DRM_CONSOLE_BUFFER_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_DRM_CONSOLE_BUFFER_H_ |
| 6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_CONSOLE_BUFFER_H_ | 6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_CONSOLE_BUFFER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 return skia::AdoptRef(surface_->newImageSnapshot()); | 33 return skia::AdoptRef(surface_->newImageSnapshot()); |
| 34 } | 34 } |
| 35 | 35 |
| 36 // Memory map the backing pixels and wrap them in |surface_|. | 36 // Memory map the backing pixels and wrap them in |surface_|. |
| 37 bool Initialize(); | 37 bool Initialize(); |
| 38 | 38 |
| 39 protected: | 39 protected: |
| 40 scoped_refptr<DrmDevice> drm_; | 40 scoped_refptr<DrmDevice> drm_; |
| 41 | 41 |
| 42 // Wrapper around the native pixel memory. | 42 // Wrapper around the native pixel memory. |
| 43 skia::RefPtr<SkSurface> surface_; | 43 sk_sp<SkSurface> surface_; |
| 44 | 44 |
| 45 // Length of a row of pixels. | 45 // Length of a row of pixels. |
| 46 uint32_t stride_ = 0; | 46 uint32_t stride_ = 0; |
| 47 | 47 |
| 48 // Buffer handle used by the DRM allocator. | 48 // Buffer handle used by the DRM allocator. |
| 49 uint32_t handle_ = 0; | 49 uint32_t handle_ = 0; |
| 50 | 50 |
| 51 // Buffer ID used by the DRM modesettings API. | 51 // Buffer ID used by the DRM modesettings API. |
| 52 uint32_t framebuffer_ = 0; | 52 uint32_t framebuffer_ = 0; |
| 53 | 53 |
| 54 // Memory map base address. | 54 // Memory map base address. |
| 55 void* mmap_base_ = nullptr; | 55 void* mmap_base_ = nullptr; |
| 56 | 56 |
| 57 // Memory map size. | 57 // Memory map size. |
| 58 size_t mmap_size_ = 0; | 58 size_t mmap_size_ = 0; |
| 59 | 59 |
| 60 DISALLOW_COPY_AND_ASSIGN(DrmConsoleBuffer); | 60 DISALLOW_COPY_AND_ASSIGN(DrmConsoleBuffer); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 } // namespace ui | 63 } // namespace ui |
| 64 | 64 |
| 65 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_CONSOLE_BUFFER_H_ | 65 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_CONSOLE_BUFFER_H_ |
| OLD | NEW |