#include "media/video/renderable_gpu_memory_buffer_video_frame_pool.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/weak_ptr.h"
#include "base/notimplemented.h"
#include "base/task/thread_pool.h"
#include "base/test/bind.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "components/viz/common/resources/shared_image_format.h"
#include "components/viz/common/resources/shared_image_format_utils.h"
#include "components/viz/test/test_context_provider.h"
#include "gpu/command_buffer/client/client_shared_image.h"
#include "gpu/command_buffer/common/shared_image_usage.h"
#include "gpu/config/gpu_finch_features.h"
#include "media/base/format_utils.h"
#include "media/base/media_switches.h"
#include "media/base/video_frame.h"
#include "media/video/fake_gpu_memory_buffer.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
_;
namespace media {
namespace {
gfx::ColorSpace GetColorSpaceForPixelFormat(media::VideoPixelFormat format) { … }
class FakeContext : public RenderableGpuMemoryBufferVideoFramePool::Context { … };
class RenderableGpuMemoryBufferVideoFramePoolTest
: public testing::TestWithParam<VideoPixelFormat> { … };
TEST_P(RenderableGpuMemoryBufferVideoFramePoolTest, SimpleLifetimes) { … }
TEST_P(RenderableGpuMemoryBufferVideoFramePoolTest, FrameFreedAfterPool) { … }
TEST_P(RenderableGpuMemoryBufferVideoFramePoolTest, CrossThread) { … }
TEST_P(RenderableGpuMemoryBufferVideoFramePoolTest,
VideoFramesDestroyedConcurrently) { … }
TEST_P(RenderableGpuMemoryBufferVideoFramePoolTest, ConcurrentCreateDestroy) { … }
TEST_P(RenderableGpuMemoryBufferVideoFramePoolTest, RespectSizeAndColorSpace) { … }
INSTANTIATE_TEST_SUITE_P(…);
}
}