diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-05-20 09:47:09 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-06-07 11:15:42 +0000 |
commit | 189d4fd8fad9e3c776873be51938cd31a42b6177 (patch) | |
tree | 6497caeff5e383937996768766ab3bb2081a40b2 /chromium/media/renderers/video_frame_yuv_converter.h | |
parent | 8bc75099d364490b22f43a7ce366b366c08f4164 (diff) | |
download | qtwebengine-chromium-189d4fd8fad9e3c776873be51938cd31a42b6177.tar.gz |
BASELINE: Update Chromium to 90.0.4430.221
Change-Id: Iff4d9d18d2fcf1a576f3b1f453010f744a232920
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/media/renderers/video_frame_yuv_converter.h')
-rw-r--r-- | chromium/media/renderers/video_frame_yuv_converter.h | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/chromium/media/renderers/video_frame_yuv_converter.h b/chromium/media/renderers/video_frame_yuv_converter.h index 899936e01aa..12566671662 100644 --- a/chromium/media/renderers/video_frame_yuv_converter.h +++ b/chromium/media/renderers/video_frame_yuv_converter.h @@ -7,6 +7,7 @@ #include <array> +#include "gpu/GLES2/gl2extchromium.h" #include "gpu/command_buffer/common/mailbox_holder.h" #include "media/base/media_export.h" #include "ui/gfx/color_space.h" @@ -32,7 +33,9 @@ class VideoFrame; // images. class MEDIA_EXPORT VideoFrameYUVConverter { public: - static void ConvertYUVVideoFrameNoCaching( + static bool IsVideoFrameFormatSupported(const VideoFrame& video_frame); + + static bool ConvertYUVVideoFrameNoCaching( const VideoFrame* video_frame, viz::RasterContextProvider* raster_context_provider, const gpu::MailboxHolder& dest_mailbox_holder); @@ -40,7 +43,7 @@ class MEDIA_EXPORT VideoFrameYUVConverter { // TODO(crbug.com/1108154): Will merge this uploading path // with ConvertYUVVideoFrameYUVWithGrContext after solving // issue 1120911, 1120912 - static bool ConvertYUVVideoFrameWithSkSurfaceNoCaching( + static bool ConvertYUVVideoFrameToDstTextureNoCaching( const VideoFrame* video_frame, viz::RasterContextProvider* raster_context_provider, const gpu::MailboxHolder& dest_mailbox_holder, @@ -52,25 +55,29 @@ class MEDIA_EXPORT VideoFrameYUVConverter { VideoFrameYUVConverter(); ~VideoFrameYUVConverter(); - void ConvertYUVVideoFrame(const VideoFrame* video_frame, + bool ConvertYUVVideoFrame(const VideoFrame* video_frame, viz::RasterContextProvider* raster_context_provider, - const gpu::MailboxHolder& dest_mailbox_holder); + const gpu::MailboxHolder& dest_mailbox_holder, + unsigned int internal_format = GL_RGBA, + unsigned int type = GL_UNSIGNED_BYTE, + bool flip_y = false, + bool use_visible_rect = false); void ReleaseCachedData(); private: - void ConvertFromVideoFrameYUVWithGrContext( + bool ConvertFromVideoFrameYUVWithGrContext( const VideoFrame* video_frame, viz::RasterContextProvider* raster_context_provider, - const gpu::MailboxHolder& dest_mailbox_holder); - void ConvertFromVideoFrameYUVSkia( + const gpu::MailboxHolder& dest_mailbox_holder, + unsigned int internal_format, + unsigned int type, + bool flip_y, + bool use_visible_rect); + bool ConvertFromVideoFrameYUVSkia( const VideoFrame* video_frame, viz::RasterContextProvider* raster_context_provider, unsigned int texture_target, - unsigned int texture_id); - bool ConvertYUVVideoFrameWithSkSurface( - const VideoFrame* video_frame, - viz::RasterContextProvider* raster_context_provider, - const gpu::MailboxHolder& dest_mailbox_holder, + unsigned int texture_id, unsigned int internal_format, unsigned int type, bool flip_y, |