WebKit Bugzilla
Attachment 371571 Details for
Bug 198523
: [WinCairo][MediaFoundation] Remove the unused video window
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198523-20190607163723.patch (text/plain), 8.22 KB, created by
Fujii Hironori
on 2019-06-07 00:37:24 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Fujii Hironori
Created:
2019-06-07 00:37:24 PDT
Size:
8.22 KB
patch
obsolete
>Subversion Revision: 246186 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 5a9bb699a82b2889ff305d1f5cb109a15cb6236f..81a4d129ec833a71e3d46511945131ebc0c40cfa 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,27 @@ >+2019-06-07 Fujii Hironori <Hironori.Fujii@sony.com> >+ >+ [WinCairo][MediaFoundation] Remove the unused video window >+ https://bugs.webkit.org/show_bug.cgi?id=198523 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Remove the video window which had been unused since Bug 150941. >+ >+ No behavior change. >+ >+ * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp: >+ (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerPrivateMediaFoundation): >+ (WebCore::MediaPlayerPrivateMediaFoundation::~MediaPlayerPrivateMediaFoundation): >+ (WebCore::MediaPlayerPrivateMediaFoundation::setSize): >+ (WebCore::MediaPlayerPrivateMediaFoundation::paint): >+ (WebCore::MediaPlayerPrivateMediaFoundation::hostWindow): >+ (WebCore::MediaPlayerPrivateMediaFoundation::createOutputNode): >+ (WebCore::MediaPlayerPrivateMediaFoundation::VideoViewWndProc): Deleted. >+ (WebCore::MediaPlayerPrivateMediaFoundation::registerVideoWindowClass): Deleted. >+ (WebCore::MediaPlayerPrivateMediaFoundation::createVideoWindow): Deleted. >+ (WebCore::MediaPlayerPrivateMediaFoundation::destroyVideoWindow): Deleted. >+ * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h: >+ > 2019-06-06 Devin Rousso <drousso@apple.com> > > Web Inspector: Timelines: only complete Composite records if the m_startedComposite (followup to r246142) >diff --git a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp b/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp >index 00b0d0884fc282b1c7f226ecd6ae507a0a6f85ee..d50b0ddd1d9eb686c693795de76b5ec2e37a04bb 100644 >--- a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp >+++ b/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp >@@ -92,18 +92,15 @@ MediaPlayerPrivateMediaFoundation::MediaPlayerPrivateMediaFoundation(MediaPlayer > , m_hasVideo(false) > , m_preparingToPlay(false) > , m_volume(1.0) >- , m_hwndVideo(nullptr) > , m_networkState(MediaPlayer::Empty) > , m_readyState(MediaPlayer::HaveNothing) > { > createSession(); >- createVideoWindow(); > } > > MediaPlayerPrivateMediaFoundation::~MediaPlayerPrivateMediaFoundation() > { > notifyDeleted(); >- destroyVideoWindow(); > endSession(); > } > >@@ -359,8 +356,6 @@ void MediaPlayerPrivateMediaFoundation::setSize(const IntSize& size) > if (!videoDisplay) > return; > >- IntPoint positionInWindow(m_lastPaintRect.location()); >- > FrameView* view = nullptr; > float deviceScaleFactor = 1.0f; > if (m_player && m_player->cachedResourceLoader() && m_player->cachedResourceLoader()->document()) { >@@ -368,22 +363,9 @@ void MediaPlayerPrivateMediaFoundation::setSize(const IntSize& size) > deviceScaleFactor = m_player->cachedResourceLoader()->document()->deviceScaleFactor(); > } > >- LayoutPoint scrollPosition; >- if (view) { >- scrollPosition = view->scrollPositionForFixedPosition(); >- positionInWindow = view->convertToContainingWindow(IntPoint(m_lastPaintRect.location())); >- } >- >- positionInWindow.move(-scrollPosition.x().toInt(), -scrollPosition.y().toInt()); >- >- int x = positionInWindow.x() * deviceScaleFactor; >- int y = positionInWindow.y() * deviceScaleFactor; > int w = m_size.width() * deviceScaleFactor; > int h = m_size.height() * deviceScaleFactor; > >- if (m_hwndVideo) >- ::MoveWindow(m_hwndVideo, x, y, w, h, FALSE); >- > RECT rc = { 0, 0, w, h }; > videoDisplay->SetVideoPosition(nullptr, &rc); > } >@@ -393,8 +375,6 @@ void MediaPlayerPrivateMediaFoundation::paint(GraphicsContext& context, const Fl > if (context.paintingDisabled() || !m_player->visible()) > return; > >- m_lastPaintRect = rect; >- > if (m_presenter) > m_presenter->paintCurrentFrame(context, rect); > } >@@ -645,64 +625,14 @@ bool MediaPlayerPrivateMediaFoundation::addBranchToPartialTopology(int stream) > return true; > } > >-LRESULT CALLBACK MediaPlayerPrivateMediaFoundation::VideoViewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) >-{ >- return DefWindowProc(hWnd, message, wParam, lParam); >-} >- >-LPCWSTR MediaPlayerPrivateMediaFoundation::registerVideoWindowClass() >-{ >- const LPCWSTR kVideoWindowClassName = L"WebVideoWindowClass"; >- >- static bool haveRegisteredWindowClass = false; >- if (haveRegisteredWindowClass) >- return kVideoWindowClassName; >- >- haveRegisteredWindowClass = true; >- >- WNDCLASSEX wcex; >- >- wcex.cbSize = sizeof(WNDCLASSEX); >- >- wcex.style = CS_DBLCLKS; >- wcex.lpfnWndProc = VideoViewWndProc; >- wcex.cbClsExtra = 0; >- wcex.cbWndExtra = 0; >- wcex.hInstance = nullptr; >- wcex.hIcon = nullptr; >- wcex.hCursor = ::LoadCursor(0, IDC_ARROW); >- wcex.hbrBackground = nullptr; >- wcex.lpszMenuName = nullptr; >- wcex.lpszClassName = kVideoWindowClassName; >- wcex.hIconSm = nullptr; >- >- if (RegisterClassEx(&wcex)) >- return kVideoWindowClassName; >- >- return nullptr; >-} >- >-void MediaPlayerPrivateMediaFoundation::createVideoWindow() >-{ >- HWND hWndParent = nullptr; >- FrameView* view = nullptr; >- if (!m_player || !m_player->cachedResourceLoader() || !m_player->cachedResourceLoader()->document()) >- return; >- view = m_player->cachedResourceLoader()->document()->view(); >- if (!view || !view->hostWindow()) >- return; >- hWndParent = view->hostWindow()->platformPageClient(); >- >- m_hwndVideo = CreateWindowEx(WS_EX_NOACTIVATE | WS_EX_TRANSPARENT, registerVideoWindowClass(), 0, WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, >- 0, 0, 0, 0, hWndParent, 0, 0, 0); >-} >- >-void MediaPlayerPrivateMediaFoundation::destroyVideoWindow() >+HWND MediaPlayerPrivateMediaFoundation::hostWindow() > { >- if (m_hwndVideo) { >- DestroyWindow(m_hwndVideo); >- m_hwndVideo = nullptr; >+ if (m_player && m_player->cachedResourceLoader() && !m_player->cachedResourceLoader()->document()) { >+ auto* view = m_player->cachedResourceLoader()->document()->view(); >+ if (view && view->hostWindow() && view->hostWindow()->platformPageClient()) >+ return view->hostWindow()->platformPageClient(); > } >+ return GetDesktopWindow(); > } > > void MediaPlayerPrivateMediaFoundation::invalidateFrameView() >@@ -784,7 +714,7 @@ bool MediaPlayerPrivateMediaFoundation::createOutputNode(COMPtr<IMFStreamDescrip > return false; > > m_presenter = new CustomVideoPresenter(this); >- m_presenter->SetVideoWindow(m_hwndVideo); >+ m_presenter->SetVideoWindow(hostWindow()); > if (FAILED(rendererActivate->SetUnknown(MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_ACTIVATE, static_cast<IMFActivate*>(m_presenter.get())))) > return false; > m_hasVideo = true; >diff --git a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h b/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h >index d85f17590206c1784fea24eb66fb8e5af0916a72..5cb517cf2f3ac5e9f579620b2ac4f11461012f8e 100644 >--- a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h >+++ b/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h >@@ -110,10 +110,8 @@ private: > bool m_hasVideo; > bool m_preparingToPlay; > float m_volume; >- HWND m_hwndVideo; > MediaPlayer::NetworkState m_networkState; > MediaPlayer::ReadyState m_readyState; >- FloatRect m_lastPaintRect; > > class MediaPlayerListener; > HashSet<MediaPlayerListener*> m_listeners; >@@ -151,10 +149,7 @@ private: > void onSessionStarted(); > void onSessionEnded(); > >- LPCWSTR registerVideoWindowClass(); >- void createVideoWindow(); >- void destroyVideoWindow(); >- >+ HWND hostWindow(); > void invalidateFrameView(); > > void addListener(MediaPlayerListener*); >@@ -162,8 +157,6 @@ private: > void setNaturalSize(const FloatSize&); > void notifyDeleted(); > >- static LRESULT CALLBACK VideoViewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); >- > bool setAllChannelVolumes(float); > > class MediaPlayerListener {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198523
:
371262
|
371571
|
371573