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 "base/files/scoped_file.h" | 8 #include "base/files/scoped_file.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "ui/gfx/buffer_types.h" | 10 #include "ui/gfx/buffer_types.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 gfx::BufferFormat GetFormat() const { return format_; } | 35 gfx::BufferFormat GetFormat() const { return format_; } |
36 gfx::BufferUsage GetUsage() const { return usage_; } | 36 gfx::BufferUsage GetUsage() const { return usage_; } |
37 int GetFd() const; | 37 int GetFd() const; |
38 int GetStride() const; | 38 int GetStride() const; |
39 | 39 |
40 private: | 40 private: |
41 GbmBuffer(const scoped_refptr<GbmDevice>& gbm, | 41 GbmBuffer(const scoped_refptr<GbmDevice>& gbm, |
42 gbm_bo* bo, | 42 gbm_bo* bo, |
43 gfx::BufferFormat format, | 43 gfx::BufferFormat format, |
44 gfx::BufferUsage usage, | 44 gfx::BufferUsage usage, |
45 base::ScopedFD fd); | 45 base::ScopedFD fd, |
| 46 int stride); |
46 ~GbmBuffer() override; | 47 ~GbmBuffer() override; |
47 | 48 |
48 gfx::BufferFormat format_; | 49 gfx::BufferFormat format_; |
49 gfx::BufferUsage usage_; | 50 gfx::BufferUsage usage_; |
50 base::ScopedFD fd_; | 51 base::ScopedFD fd_; |
| 52 int stride_; |
51 | 53 |
52 DISALLOW_COPY_AND_ASSIGN(GbmBuffer); | 54 DISALLOW_COPY_AND_ASSIGN(GbmBuffer); |
53 }; | 55 }; |
54 | 56 |
55 class GbmPixmap : public NativePixmap { | 57 class GbmPixmap : public NativePixmap { |
56 public: | 58 public: |
57 GbmPixmap(GbmSurfaceFactory* surface_manager, | 59 GbmPixmap(GbmSurfaceFactory* surface_manager, |
58 const scoped_refptr<GbmBuffer>& buffer); | 60 const scoped_refptr<GbmBuffer>& buffer); |
59 | 61 |
60 void SetProcessingCallback( | 62 void SetProcessingCallback( |
(...skipping 26 matching lines...) Expand all Loading... |
87 // this Pixmap. This holds the processed buffer. | 89 // this Pixmap. This holds the processed buffer. |
88 scoped_refptr<GbmPixmap> processed_pixmap_; | 90 scoped_refptr<GbmPixmap> processed_pixmap_; |
89 ProcessingCallback processing_callback_; | 91 ProcessingCallback processing_callback_; |
90 | 92 |
91 DISALLOW_COPY_AND_ASSIGN(GbmPixmap); | 93 DISALLOW_COPY_AND_ASSIGN(GbmPixmap); |
92 }; | 94 }; |
93 | 95 |
94 } // namespace ui | 96 } // namespace ui |
95 | 97 |
96 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ | 98 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ |
OLD | NEW |