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/paint_canvas_video_renderer.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/paint_canvas_video_renderer.h')
-rw-r--r-- | chromium/media/renderers/paint_canvas_video_renderer.h | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/chromium/media/renderers/paint_canvas_video_renderer.h b/chromium/media/renderers/paint_canvas_video_renderer.h index 943cc378ac5..0c6b4062d88 100644 --- a/chromium/media/renderers/paint_canvas_video_renderer.h +++ b/chromium/media/renderers/paint_canvas_video_renderer.h @@ -41,6 +41,7 @@ class RasterContextProvider; } namespace media { +class VideoTextureBacking; // Handles rendering of VideoFrames to PaintCanvases. class MEDIA_EXPORT PaintCanvasVideoRenderer { @@ -211,22 +212,15 @@ class MEDIA_EXPORT PaintCanvasVideoRenderer { // to the visible size of the VideoFrame. Its contents are generated lazily. cc::PaintImage paint_image; - // The context provider used to generate |source_mailbox| and - // |source_texture|. This is only set if the VideoFrame was texture-backed. - scoped_refptr<viz::RasterContextProvider> raster_context_provider; - - // The mailbox for the source texture. This can be either the source - // VideoFrame's texture (if |wraps_video_frame_texture| is true) or a newly - // allocated shared image (if |wraps_video_frame_texture| is false) if a - // copy or conversion was necessary. - // This is only set if the VideoFrame was texture-backed. - gpu::Mailbox source_mailbox; + // The backing for the source texture. This is also responsible for managing + // the lifetime of the texture. + sk_sp<VideoTextureBacking> texture_backing; - // The texture ID created when importing |source_mailbox|. + // The GL texture ID used in non-OOP code path. // This is only set if the VideoFrame was texture-backed. uint32_t source_texture = 0; - // The allocated size of |source_mailbox|. + // The allocated size of VideoFrame texture. // This is only set if the VideoFrame was texture-backed. gfx::Size coded_size; @@ -235,13 +229,6 @@ class MEDIA_EXPORT PaintCanvasVideoRenderer { // This is only set if the VideoFrame was texture-backed. gfx::Rect visible_rect; - // Whether |source_mailbox| directly points to a texture of the VideoFrame - // (if true), or to an allocated shared image (if false). - bool wraps_video_frame_texture = false; - - // Whether the texture pointed by |paint_image| is owned by skia or not. - bool texture_ownership_in_skia = false; - // Used to allow recycling of the previous shared image. This requires that // no external users have access to this resource via SkImage. Returns true // if the existing resource can be recycled. @@ -269,6 +256,8 @@ class MEDIA_EXPORT PaintCanvasVideoRenderer { unsigned int type, bool flip_y); + bool CacheBackingWrapsTexture() const; + base::Optional<Cache> cache_; // If |cache_| is not used for a while, it's deleted to save memory. |