Commit 3c8a7d5
WebMediaPlayerMSCompositor: Fix excessive canvas cache reset
PaintCanvasVideoRenderer, for complicated reasons, maintains a cached
texture resulting from an YUV to RGB conversion. The goal of the cache
is not to avoid repeated YUV to RGB conversions, but to avoid repeated
allocation and freeing of the RGB texture every frame.
WebMediaPlayerMSCompositor::CheckForFrameChanges resets this cache every
time it gets a new frame, which makes the cache in
PaintCanvasVideoRenderer useless.
Change WebMediaPlayerMSCompositor::CheckForFrameChanges to only reset
the cache when the frame size changes.
Bug: 1235686
Change-Id: If8a6746fdc6828b9852653631d0de72777877b9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3089355
Reviewed-by: Guido Urdaneta <[email protected]>
Reviewed-by: Dale Curtis <[email protected]>
Commit-Queue: ccameron <[email protected]>
Cr-Commit-Position: refs/heads/master@{#911727}1 parent d8c1426 commit 3c8a7d5
File tree
1 file changed
+3
-3
lines changed- third_party/blink/renderer/modules/mediastream
1 file changed
+3
-3
lines changedLines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
708 | 708 | | |
709 | 709 | | |
710 | 710 | | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
711 | 714 | | |
712 | | - | |
713 | | - | |
714 | | - | |
715 | 715 | | |
716 | 716 | | |
717 | 717 | | |
| |||
0 commit comments