| 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; |
| 44 uint64_t GetFormatModifier(size_t plane) const; | 45 uint64_t GetFormatModifier(size_t plane) const; |
| 45 gfx::Size GetSize() const override; | 46 gfx::Size GetSize() const override; |
| 46 | 47 |
| 47 private: | 48 private: |
| 48 GbmBuffer(const scoped_refptr<GbmDevice>& gbm, | 49 GbmBuffer(const scoped_refptr<GbmDevice>& gbm, |
| 49 gbm_bo* bo, | 50 gbm_bo* bo, |
| 50 gfx::BufferFormat format, | 51 gfx::BufferFormat format, |
| 51 gfx::BufferUsage usage, | 52 gfx::BufferUsage usage, |
| 52 std::vector<base::ScopedFD>&& fds, | 53 std::vector<base::ScopedFD>&& fds, |
| 53 const gfx::Size& size, | 54 const gfx::Size& size, |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // this Pixmap. This holds the processed buffer. | 104 // this Pixmap. This holds the processed buffer. |
| 104 scoped_refptr<GbmPixmap> processed_pixmap_; | 105 scoped_refptr<GbmPixmap> processed_pixmap_; |
| 105 ProcessingCallback processing_callback_; | 106 ProcessingCallback processing_callback_; |
| 106 | 107 |
| 107 DISALLOW_COPY_AND_ASSIGN(GbmPixmap); | 108 DISALLOW_COPY_AND_ASSIGN(GbmPixmap); |
| 108 }; | 109 }; |
| 109 | 110 |
| 110 } // namespace ui | 111 } // namespace ui |
| 111 | 112 |
| 112 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ | 113 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ |
| OLD | NEW |