#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "components/viz/service/frame_sinks/video_capture/shared_memory_video_frame_pool.h"
#include <memory>
#include "media/base/video_frame.h"
#include "media/base/video_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
VideoFrame;
namespace viz {
namespace {
constexpr gfx::Size kSize = …;
constexpr media::VideoPixelFormat kFormat = …;
void ExpectValidHandleForDelivery(
const base::ReadOnlySharedMemoryRegion& region) { … }
TEST(SharedMemoryVideoFramePoolTest, FramesConfiguredCorrectly) { … }
TEST(SharedMemoryVideoFramePoolTest, UsesAvailableBuffersIfPossible) { … }
TEST(SharedMemoryVideoFramePoolTest, ReachesCapacityLimit) { … }
TEST(SharedMemoryVideoFramePoolTest, ReportsCorrectUtilization) { … }
bool PlanesAreFilledWithValues(const VideoFrame& frame, const uint8_t* values) { … }
TEST(SharedMemoryVideoFramePoolTest, FramesReturnedWhenPoolIsGone) { … }
}
}