diff options
Diffstat (limited to 'Source/WebCore/platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp b/Source/WebCore/platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp index 01db7f2..dd3cd32 100644 --- a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp +++ b/Source/WebCore/platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp @@ -34,6 +34,11 @@ #include <CoreGraphics/CGColor.h> #endif +#if USE(ACCELERATED_COMPOSITING) +#include "CACFLayerTreeHost.h" +#include "PlatformCALayer.h" +#endif + namespace WebCore { MediaPlayerPrivateFullscreenWindow::MediaPlayerPrivateFullscreenWindow(MediaPlayerPrivateFullscreenClient* client) @@ -47,8 +52,11 @@ MediaPlayerPrivateFullscreenWindow::MediaPlayerPrivateFullscreenWindow(MediaPlay MediaPlayerPrivateFullscreenWindow::~MediaPlayerPrivateFullscreenWindow() { - if (m_hwnd) - close(); + if (!m_hwnd) + return; + + ::DestroyWindow(m_hwnd); + ASSERT(!m_hwnd); } void MediaPlayerPrivateFullscreenWindow::createWindow(HWND parentHwnd) @@ -65,8 +73,7 @@ void MediaPlayerPrivateFullscreenWindow::createWindow(HWND parentHwnd) windowAtom = ::RegisterClassEx(&wcex); } - if (m_hwnd) - close(); + ASSERT(!m_hwnd); MONITORINFO mi = {0}; mi.cbSize = sizeof(MONITORINFO); @@ -87,12 +94,6 @@ void MediaPlayerPrivateFullscreenWindow::createWindow(HWND parentHwnd) ::SetFocus(m_hwnd); } -void MediaPlayerPrivateFullscreenWindow::close() -{ - ::DestroyWindow(m_hwnd); - ASSERT(!m_hwnd); -} - #if USE(ACCELERATED_COMPOSITING) void MediaPlayerPrivateFullscreenWindow::setRootChildLayer(PassRefPtr<PlatformCALayer> rootChild) { |