#include "third_party/blink/renderer/platform/graphics/video_frame_image_util.h"
#include "base/functional/callback_helpers.h"
#include "base/test/task_environment.h"
#include "build/build_config.h"
#include "components/viz/common/gpu/raster_context_provider.h"
#include "components/viz/test/test_context_provider.h"
#include "gpu/command_buffer/common/capabilities.h"
#include "media/base/video_frame.h"
#include "media/renderers/shared_image_video_frame_test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/platform/graphics/canvas_resource_provider.h"
#include "third_party/blink/renderer/platform/graphics/gpu/shared_gpu_context.h"
#include "third_party/blink/renderer/platform/graphics/static_bitmap_image.h"
#include "third_party/blink/renderer/platform/graphics/test/gpu_test_utils.h"
#include "third_party/blink/renderer/platform/testing/testing_platform_support.h"
#include "third_party/blink/renderer/platform/testing/video_frame_utils.h"
#include "third_party/skia/include/gpu/GrDriverBugWorkarounds.h"
namespace blink {
namespace {
constexpr auto kTestSize = …;
const auto kTestInfo = …;
class AcceleratedCompositingTestPlatform
: public blink::TestingPlatformSupport { … };
class ScopedFakeGpuContext { … };
void TestOrientation(scoped_refptr<media::VideoFrame> frame,
bool expect_broken_tagging = false) { … }
}
TEST(VideoFrameImageUtilTest, VideoTransformationToFromImageOrientation) { … }
TEST(VideoFrameImageUtilTest, WillCreateAcceleratedImagesFromVideoFrame) { … }
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_MAC)
TEST(VideoFrameImageUtilTest, CreateImageFromVideoFrameZeroCopy) { … }
#endif
TEST(VideoFrameImageUtilTest, CreateImageFromVideoFrameSoftwareFrame) { … }
TEST(VideoFrameImageUtilTest, CreateImageFromVideoFrameGpuMemoryBufferFrame) { … }
TEST(VideoFrameImageUtilTest, CreateImageFromVideoFrameTextureFrame) { … }
TEST(VideoFrameImageUtilTest,
CreateAcceleratedImageFromVideoFrameBasicSoftwareFrame) { … }
TEST(VideoFrameImageUtilTest, CreateAcceleratedImageFromGpuMemoryBufferFrame) { … }
TEST(VideoFrameImageUtilTest, CreateAcceleratedImageFromTextureFrame) { … }
TEST(VideoFrameImageUtilTest, FlushedAcceleratedImage) { … }
TEST(VideoFrameImageUtilTest, SoftwareCreateResourceProviderForVideoFrame) { … }
TEST(VideoFrameImageUtilTest, AcceleratedCreateResourceProviderForVideoFrame) { … }
TEST(VideoFrameImageUtilTest, WorkaroundCreateResourceProviderForVideoFrame) { … }
TEST(VideoFrameImageUtilTest, DestRectWithoutCanvasResourceProvider) { … }
TEST(VideoFrameImageUtilTest, CanvasResourceProviderTooSmallForDestRect) { … }
TEST(VideoFrameImageUtilTest, CanvasResourceProviderDestRect) { … }
}