OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_GFX_OZONE_IMPL_DRM_SKBITMAP_OZONE_H_ | 5 #ifndef UI_GFX_OZONE_IMPL_DRM_SKBITMAP_OZONE_H_ |
6 #define UI_GFX_OZONE_IMPL_DRM_SKBITMAP_OZONE_H_ | 6 #define UI_GFX_OZONE_IMPL_DRM_SKBITMAP_OZONE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "third_party/skia/include/core/SkBitmap.h" | 9 #include "third_party/skia/include/core/SkBitmap.h" |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 uint32_t get_framebuffer() const { return framebuffer_; }; | 26 uint32_t get_framebuffer() const { return framebuffer_; }; |
27 | 27 |
28 int get_fd() const { return fd_; }; | 28 int get_fd() const { return fd_; }; |
29 | 29 |
30 // Return the color depth of a pixel in this buffer. | 30 // Return the color depth of a pixel in this buffer. |
31 uint8_t GetColorDepth() const; | 31 uint8_t GetColorDepth() const; |
32 | 32 |
33 private: | 33 private: |
34 friend class DrmAllocator; | 34 friend class DrmAllocator; |
| 35 friend class HardwareDisplayControllerOzone; |
35 | 36 |
36 void set_handle(uint32_t handle) { handle_ = handle; }; | 37 void set_handle(uint32_t handle) { handle_ = handle; }; |
37 void set_framebuffer(uint32_t framebuffer) { framebuffer_ = framebuffer; }; | 38 void set_framebuffer(uint32_t framebuffer) { framebuffer_ = framebuffer; }; |
38 | 39 |
39 // File descriptor used by the DRM allocator to request buffers from the DRM | 40 // File descriptor used by the DRM allocator to request buffers from the DRM |
40 // stack. | 41 // stack. |
41 int fd_; | 42 int fd_; |
42 | 43 |
43 // Buffer handle used by the DRM allocator. | 44 // Buffer handle used by the DRM allocator. |
44 uint32_t handle_; | 45 uint32_t handle_; |
45 | 46 |
46 // Buffer ID used by the DRM modesettings API. This is set when the buffer is | 47 // Buffer ID used by the DRM modesettings API. This is set when the buffer is |
47 // registered with the CRTC. | 48 // registered with the CRTC. |
48 uint32_t framebuffer_; | 49 uint32_t framebuffer_; |
49 | 50 |
50 DISALLOW_COPY_AND_ASSIGN(DrmSkBitmapOzone); | 51 DISALLOW_COPY_AND_ASSIGN(DrmSkBitmapOzone); |
51 }; | 52 }; |
52 | 53 |
53 } // namespace gfx | 54 } // namespace gfx |
54 | 55 |
55 #endif // UI_GFX_OZONE_IMPL_DRM_SKBITMAP_OZONE_H_ | 56 #endif // UI_GFX_OZONE_IMPL_DRM_SKBITMAP_OZONE_H_ |
OLD | NEW |