Index: ui/ozone/platform/drm/gpu/gbm_buffer.h |
diff --git a/ui/ozone/platform/drm/gpu/gbm_buffer.h b/ui/ozone/platform/drm/gpu/gbm_buffer.h |
index 2823243793ea49ed20ab8ef115bfa22d76bc25fb..067f5ae67cc56e30a21048a60d349ee373dc5b2d 100644 |
--- a/ui/ozone/platform/drm/gpu/gbm_buffer.h |
+++ b/ui/ozone/platform/drm/gpu/gbm_buffer.h |
@@ -11,7 +11,7 @@ |
#include "base/macros.h" |
#include "ui/gfx/buffer_types.h" |
#include "ui/gfx/geometry/size.h" |
-#include "ui/gfx/native_pixmap.h" |
+#include "ui/gfx/linux/native_pixmap_dmabuf.h" |
#include "ui/ozone/platform/drm/gpu/gbm_buffer_base.h" |
struct gbm_bo; |
@@ -49,8 +49,12 @@ class GbmBuffer : public GbmBufferBase { |
int GetOffset(size_t plane) const; |
size_t GetSize(size_t plane) const; |
uint64_t GetFormatModifier(size_t plane) const; |
+ |
+ // GbmBufferBase |
gfx::Size GetSize() const override; |
+ scoped_refptr<gfx::NativePixmapDmabufHelper> helper() { return helper_; } |
+ |
private: |
GbmBuffer(const scoped_refptr<GbmDevice>& gbm, |
gbm_bo* bo, |
@@ -74,37 +78,26 @@ class GbmBuffer : public GbmBufferBase { |
uint32_t format_; |
uint32_t flags_; |
- std::vector<base::ScopedFD> fds_; |
gfx::Size size_; |
- std::vector<gfx::NativePixmapPlane> planes_; |
+ scoped_refptr<gfx::NativePixmapDmabufHelper> helper_; |
DISALLOW_COPY_AND_ASSIGN(GbmBuffer); |
}; |
-class GbmPixmap : public gfx::NativePixmap { |
+class GbmPixmap : public gfx::NativePixmapDmaBuf { |
public: |
GbmPixmap(GbmSurfaceFactory* surface_manager, |
const scoped_refptr<GbmBuffer>& buffer); |
- void SetProcessingCallback( |
- const ProcessingCallback& processing_callback) override; |
- |
- // NativePixmap: |
- void* GetEGLClientBuffer() const override; |
- bool AreDmaBufFdsValid() const override; |
- size_t GetDmaBufFdCount() const override; |
- int GetDmaBufFd(size_t plane) const override; |
- int GetDmaBufPitch(size_t plane) const override; |
- int GetDmaBufOffset(size_t plane) const override; |
- uint64_t GetDmaBufModifier(size_t plane) const override; |
- gfx::BufferFormat GetBufferFormat() const override; |
- gfx::Size GetBufferSize() const override; |
+ // NativePixmapDmabuf |
bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
int plane_z_order, |
gfx::OverlayTransform plane_transform, |
const gfx::Rect& display_bounds, |
const gfx::RectF& crop_rect) override; |
+ void SetProcessingCallback( |
+ const ProcessingCallback& processing_callback) override; |
gfx::NativePixmapHandle ExportHandle() override; |
scoped_refptr<GbmBuffer> buffer() { return buffer_; } |