| 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 da9b6871f1b140845c6702e6121761b423916c89..244aa223ffb470b5aa867bc0f9760ad055d841cc 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;
|
| @@ -48,8 +48,12 @@ class GbmBuffer : public GbmBufferBase {
|
| int GetStride(size_t plane) const;
|
| int GetOffset(size_t plane) const;
|
| size_t GetSize(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,
|
| @@ -73,37 +77,27 @@ 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;
|
| + // NativePixmapDmabuf
|
| uint64_t GetDmaBufModifier(size_t plane) const override;
|
| - gfx::BufferFormat GetBufferFormat() const override;
|
| - gfx::Size GetBufferSize() const override;
|
| 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_; }
|
|
|