chromium/ui/ozone/platform/wayland/host/wayland_shm_buffer.h

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef UI_OZONE_PLATFORM_WAYLAND_HOST_WAYLAND_SHM_BUFFER_H_
#define UI_OZONE_PLATFORM_WAYLAND_HOST_WAYLAND_SHM_BUFFER_H_

#include "base/memory/shared_memory_mapping.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkSurface.h"
#include "ui/gfx/geometry/size.h"
#include "ui/ozone/platform/wayland/common/wayland_object.h"

namespace ui {

class WaylandBufferFactory;

// Encapsulates a Wayland SHM buffer, covering basically 2 use cases:
// (1) Buffers created and mmap'ed locally to draw skia bitmap(s) into; and
// (2) Buffers created using file descriptor (e.g: sent by gpu process/thread,
// through IPC), not mapped in local memory address space.
// WaylandShmBuffer is moveable, non-copyable, and is assumed to own both
// wl_buffer and WritableSharedMemoryMapping (if any) instance.
class WaylandShmBuffer {};

}  // namespace ui

#endif  // UI_OZONE_PLATFORM_WAYLAND_HOST_WAYLAND_SHM_BUFFER_H_