chromium/media/gpu/chromeos/native_pixmap_frame_resource.h

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

#ifndef MEDIA_GPU_CHROMEOS_NATIVE_PIXMAP_FRAME_RESOURCE_H_
#define MEDIA_GPU_CHROMEOS_NATIVE_PIXMAP_FRAME_RESOURCE_H_

#include <optional>

#include "base/memory/ref_counted.h"
#include "base/time/time.h"
#include "media/base/video_frame_layout.h"
#include "media/base/video_frame_metadata.h"
#include "media/gpu/chromeos/frame_resource.h"
#include "ui/gfx/buffer_types.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/linux/native_pixmap_dmabuf.h"

namespace media {

// Implements a FrameResource that is backed by a gfx::NativePixmapDmaBuf. The
// frame's pixel content is only accessible by mapping the frame using a
// GenericDmaBufVideoFrameMapper. IsMappable() returns false and all data
// accessors return nullptr.
class NativePixmapFrameResource : public FrameResource {};

}  // namespace media
#endif  // MEDIA_GPU_CHROMEOS_NATIVE_PIXMAP_FRAME_RESOURCE_H_