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_GBM_BUFFER_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ |
6 #define UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ | 6 #define UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/files/scoped_file.h" | 10 #include "base/files/scoped_file.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 const gfx::Size& size, | 34 const gfx::Size& size, |
35 std::vector<base::ScopedFD>&& fds, | 35 std::vector<base::ScopedFD>&& fds, |
36 const std::vector<gfx::NativePixmapPlane>& planes); | 36 const std::vector<gfx::NativePixmapPlane>& planes); |
37 gfx::BufferFormat GetFormat() const { return format_; } | 37 gfx::BufferFormat GetFormat() const { return format_; } |
38 gfx::BufferUsage GetUsage() const { return usage_; } | 38 gfx::BufferUsage GetUsage() const { return usage_; } |
39 bool AreFdsValid() const; | 39 bool AreFdsValid() const; |
40 size_t GetFdCount() const; | 40 size_t GetFdCount() const; |
41 int GetFd(size_t plane) const; | 41 int GetFd(size_t plane) const; |
42 int GetStride(size_t plane) const; | 42 int GetStride(size_t plane) const; |
43 int GetOffset(size_t plane) const; | 43 int GetOffset(size_t plane) const; |
44 size_t GetSize(size_t plane) const; | |
45 uint64_t GetFormatModifier(size_t plane) const; | 44 uint64_t GetFormatModifier(size_t plane) const; |
46 gfx::Size GetSize() const override; | 45 gfx::Size GetSize() const override; |
47 | 46 |
48 private: | 47 private: |
49 GbmBuffer(const scoped_refptr<GbmDevice>& gbm, | 48 GbmBuffer(const scoped_refptr<GbmDevice>& gbm, |
50 gbm_bo* bo, | 49 gbm_bo* bo, |
51 gfx::BufferFormat format, | 50 gfx::BufferFormat format, |
52 gfx::BufferUsage usage, | 51 gfx::BufferUsage usage, |
53 std::vector<base::ScopedFD>&& fds, | 52 std::vector<base::ScopedFD>&& fds, |
54 const gfx::Size& size, | 53 const gfx::Size& size, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 // this Pixmap. This holds the processed buffer. | 103 // this Pixmap. This holds the processed buffer. |
105 scoped_refptr<GbmPixmap> processed_pixmap_; | 104 scoped_refptr<GbmPixmap> processed_pixmap_; |
106 ProcessingCallback processing_callback_; | 105 ProcessingCallback processing_callback_; |
107 | 106 |
108 DISALLOW_COPY_AND_ASSIGN(GbmPixmap); | 107 DISALLOW_COPY_AND_ASSIGN(GbmPixmap); |
109 }; | 108 }; |
110 | 109 |
111 } // namespace ui | 110 } // namespace ui |
112 | 111 |
113 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ | 112 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ |
OLD | NEW |