| Index: ui/ozone/platform/drm/gpu/gbm_map_pixmap_intel.h
|
| diff --git a/ui/ozone/platform/drm/gpu/gbm_map_pixmap_intel.h b/ui/ozone/platform/drm/gpu/gbm_map_pixmap_intel.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1512f44e076d52cf2b5211690bc90ce5dc0c64c3
|
| --- /dev/null
|
| +++ b/ui/ozone/platform/drm/gpu/gbm_map_pixmap_intel.h
|
| @@ -0,0 +1,54 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef UI_OZONE_PLATFORM_DRM_GPU_GBM_MAP_PIXMAP_INTEL_H_
|
| +#define UI_OZONE_PLATFORM_DRM_GPU_GBM_MAP_PIXMAP_INTEL_H_
|
| +
|
| +extern "C" {
|
| +#include <libdrm/intel_bufmgr.h>
|
| +}
|
| +
|
| +#include "base/macros.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "ui/gfx/geometry/size.h"
|
| +#include "ui/ozone/platform/drm/gpu/gbm_buffer_base.h"
|
| +#include "ui/ozone/public/native_pixmap.h"
|
| +#include "ui/ozone/public/surface_factory_ozone.h"
|
| +
|
| +namespace ui {
|
| +
|
| +class GbmDevice;
|
| +
|
| +class GbmMapPixmapIntel : public NativePixmap {
|
| + public:
|
| + static scoped_refptr<GbmMapPixmapIntel> CreatePixmap(
|
| + const scoped_refptr<GbmDevice>& gbm,
|
| + SurfaceFactoryOzone::BufferFormat format,
|
| + const gfx::Size& size,
|
| + gfx::GpuMemoryBufferHandle* handle);
|
| +
|
| + // NativePixmap:
|
| + void* GetEGLClientBuffer() override;
|
| + int GetDmaBufFd() override;
|
| + int GetDmaBufPitch() override;
|
| +
|
| + private:
|
| + GbmMapPixmapIntel();
|
| + ~GbmMapPixmapIntel() override;
|
| +
|
| + bool Initialize(const scoped_refptr<GbmDevice>& gbm,
|
| + SurfaceFactoryOzone::BufferFormat format,
|
| + const gfx::Size& size,
|
| + gfx::GpuMemoryBufferHandle* handle);
|
| +
|
| + drm_intel_bo* buffer_;
|
| + base::ScopedFD prime_fd_;
|
| + uint32 stride_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(GbmMapPixmapIntel);
|
| +};
|
| +
|
| +} // namespace ui
|
| +
|
| +#endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_MAP_PIXMAP_INTEL_H_
|
|
|