Title: [287948] trunk/Source/WebCore
Revision
287948
Author
hironori.fu...@sony.com
Date
2022-01-12 13:17:49 -0800 (Wed, 12 Jan 2022)

Log Message

[MediaFoundation] Invalidate only the videa area using MediaPlayer::repaint(), not the whole FrameView
https://bugs.webkit.org/show_bug.cgi?id=235088

Reviewed by Don Olmstead.

r192176 added MediaPlayerPrivateMediaFoundation::invalidateFrameView()
to render the next frame. It was, as per the method name,
invalidating the whole FrameView.

This approach doesn't render video frames with TiledBacking (Bug
233676). Calling MediaPlayer::repaint() is the correct way to
invalidate the video area.

* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::invalidateVideoArea): Call MediaPlayer::repaint().
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::processInputNotify):
(WebCore::MediaPlayerPrivateMediaFoundation::invalidateFrameView): Deleted.
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (287947 => 287948)


--- trunk/Source/WebCore/ChangeLog	2022-01-12 20:56:20 UTC (rev 287947)
+++ trunk/Source/WebCore/ChangeLog	2022-01-12 21:17:49 UTC (rev 287948)
@@ -1,3 +1,24 @@
+2022-01-12  Fujii Hironori  <hironori.fu...@sony.com>
+
+        [MediaFoundation] Invalidate only the videa area using MediaPlayer::repaint(), not the whole FrameView
+        https://bugs.webkit.org/show_bug.cgi?id=235088
+
+        Reviewed by Don Olmstead.
+
+        r192176 added MediaPlayerPrivateMediaFoundation::invalidateFrameView()
+        to render the next frame. It was, as per the method name,
+        invalidating the whole FrameView.
+
+        This approach doesn't render video frames with TiledBacking (Bug
+        233676). Calling MediaPlayer::repaint() is the correct way to
+        invalidate the video area.
+
+        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
+        (WebCore::MediaPlayerPrivateMediaFoundation::invalidateVideoArea): Call MediaPlayer::repaint().
+        (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::processInputNotify):
+        (WebCore::MediaPlayerPrivateMediaFoundation::invalidateFrameView): Deleted.
+        * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
+
 2022-01-12  Wenson Hsieh  <wenson_hs...@apple.com>
 
         [Live Text] Image overlay text is misaligned on rfi.fr

Modified: trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp (287947 => 287948)


--- trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp	2022-01-12 20:56:20 UTC (rev 287947)
+++ trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp	2022-01-12 21:17:49 UTC (rev 287948)
@@ -635,16 +635,9 @@
     return GetDesktopWindow();
 }
 
-void MediaPlayerPrivateMediaFoundation::invalidateFrameView()
+void MediaPlayerPrivateMediaFoundation::invalidateVideoArea()
 {
-    FrameView* view = nullptr;
-    if (!m_player || !m_player->cachedResourceLoader() || !m_player->cachedResourceLoader()->document())
-        return;
-    view = m_player->cachedResourceLoader()->document()->view();
-    if (!view)
-        return;
-
-    view->invalidate();
+    m_player->repaint();
 }
 
 void MediaPlayerPrivateMediaFoundation::addListener(MediaPlayerListener* listener)
@@ -1622,7 +1615,7 @@
     if (m_mediaPlayer) {
         callOnMainThread([weakPtr = m_mediaPlayer->m_weakThis] {
             if (weakPtr)
-                weakPtr->invalidateFrameView();
+                weakPtr->invalidateVideoArea();
         });
     }
 

Modified: trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h (287947 => 287948)


--- trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h	2022-01-12 20:56:20 UTC (rev 287947)
+++ trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h	2022-01-12 21:17:49 UTC (rev 287948)
@@ -157,7 +157,7 @@
     void onSessionEnded();
 
     HWND hostWindow();
-    void invalidateFrameView();
+    void invalidateVideoArea();
 
     void addListener(MediaPlayerListener*);
     void removeListener(MediaPlayerListener*);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to