Diff
Modified: trunk/Source/WebCore/ChangeLog (258780 => 258781)
--- trunk/Source/WebCore/ChangeLog 2020-03-20 19:56:49 UTC (rev 258780)
+++ trunk/Source/WebCore/ChangeLog 2020-03-20 20:04:30 UTC (rev 258781)
@@ -1,3 +1,15 @@
+2020-03-20 Don Olmstead <[email protected]>
+
+ [GPUP] Add PlatformLayerContainer to hold pointer to PlatformLayer
+ https://bugs.webkit.org/show_bug.cgi?id=208963
+
+ Reviewed by Eric Carlson.
+
+ Add a PlatformLayerContainer definition for use within the GPU Process code.
+ Migrate to using over typedef in the file.
+
+ * platform/graphics/PlatformLayer.h:
+
2020-03-20 Andres Gonzalez <[email protected]>
Isolated tree updates must happen after AXObject has finished handling notifications.
Modified: trunk/Source/WebCore/platform/graphics/PlatformLayer.h (258780 => 258781)
--- trunk/Source/WebCore/platform/graphics/PlatformLayer.h 2020-03-20 19:56:49 UTC (rev 258780)
+++ trunk/Source/WebCore/platform/graphics/PlatformLayer.h 2020-03-20 20:04:30 UTC (rev 258781)
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2012 Google Inc. All rights reserved.
+ * Copyright (C) 2020 Sony Interactive Entertainment Inc. All Rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -27,7 +28,7 @@
#if PLATFORM(COCOA)
OBJC_CLASS CALayer;
-typedef CALayer PlatformLayer;
+using PlatformLayer = CALayer;
#elif PLATFORM(WIN) && USE(CA)
typedef struct _CACFLayer PlatformLayer;
#elif USE(NICOSIA)
@@ -34,18 +35,27 @@
namespace Nicosia {
class PlatformLayer;
}
-typedef Nicosia::PlatformLayer PlatformLayer;
+using PlatformLayer = Nicosia::PlatformLayer;
#elif USE(COORDINATED_GRAPHICS)
namespace WebCore {
class TextureMapperPlatformLayerProxyProvider;
-typedef TextureMapperPlatformLayerProxyProvider PlatformLayer;
};
+using PlatformLayer = WebCore::TextureMapperPlatformLayerProxyProvider;
#elif USE(TEXTURE_MAPPER)
namespace WebCore {
class TextureMapperPlatformLayer;
-typedef TextureMapperPlatformLayer PlatformLayer;
};
+using PlatformLayer = WebCore::TextureMapperPlatformLayer;
#else
-typedef void* PlatformLayer;
+using PlatformLayer = void*;
#endif
+#if PLATFORM(COCOA)
+#include <wtf/RetainPtr.h>
+using PlatformLayerContainer = WTF::RetainPtr<PlatformLayer>;
+#elif USE(TEXTURE_MAPPER)
+using PlatformLayerContainer = std::unique_ptr<PlatformLayer>;
+#else
+#include <wtf/RefPtr.h>
+using PlatformLayerContainer = WTF::RefPtr<PlatformLayer>;
+#endif
Modified: trunk/Source/WebKit/ChangeLog (258780 => 258781)
--- trunk/Source/WebKit/ChangeLog 2020-03-20 19:56:49 UTC (rev 258780)
+++ trunk/Source/WebKit/ChangeLog 2020-03-20 20:04:30 UTC (rev 258781)
@@ -1,3 +1,22 @@
+2020-03-20 Don Olmstead <[email protected]>
+
+ [GPUP] Add PlatformLayerContainer to hold pointer to PlatformLayer
+ https://bugs.webkit.org/show_bug.cgi?id=208963
+
+ Reviewed by Eric Carlson.
+
+ Use PlatformLayerContainer since RetainPtr is a Cocoa only construct. This
+ allows non-Cocoa ports to get further with compiling out the GPU Process.
+
+ * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
+ * WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
+ * WebProcess/GPU/media/VideoLayerRemote.h:
+ * WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm:
+ (WebKit::MediaPlayerPrivateRemote::createVideoFullscreenLayer):
+ * WebProcess/GPU/media/cocoa/VideoLayerRemoteCocoa.mm:
+ (WebKit::createVideoLayerRemote):
+ * WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h:
+
2020-03-20 Tim Horton <[email protected]>
Upstream a variety of Cocoa-platform HAVE and ENABLE macros
Modified: trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp (258780 => 258781)
--- trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp 2020-03-20 19:56:49 UTC (rev 258780)
+++ trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp 2020-03-20 20:04:30 UTC (rev 258781)
@@ -54,6 +54,14 @@
#include <wtf/URL.h>
#include <wtf/text/CString.h>
+#if USE(NICOSIA)
+#include <WebCore/NicosiaPlatformLayer.h>
+#elif USE(COORDINATED_GRAPHICS)
+#include <WebCore/TextureMapperPlatformLayerProxyProvider.h>
+#elif USE(TEXTURE_MAPPER)
+#include <WebCore/TextureMapperPlatformLayer.h>
+#endif
+
#if ENABLE(ENCRYPTED_MEDIA)
#include "RemoteCDMInstance.h"
#endif
Modified: trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h (258780 => 258781)
--- trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h 2020-03-20 19:56:49 UTC (rev 258780)
+++ trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h 2020-03-20 20:04:30 UTC (rev 258781)
@@ -183,7 +183,7 @@
PlatformLayer* platformLayer() const final;
#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
- RetainPtr<PlatformLayer> createVideoFullscreenLayer() final;
+ PlatformLayerContainer createVideoFullscreenLayer() final;
void setVideoFullscreenLayer(PlatformLayer*, WTF::Function<void()>&& completionHandler) final;
void updateVideoFullscreenInlineImage() final;
void setVideoFullscreenFrame(WebCore::FloatRect) final;
@@ -357,8 +357,8 @@
WebCore::MediaPlayer* m_player { nullptr };
RefPtr<WebCore::PlatformMediaResourceLoader> m_mediaResourceLoader;
- RetainPtr<PlatformLayer> m_videoInlineLayer;
- RetainPtr<PlatformLayer> m_videoFullscreenLayer;
+ PlatformLayerContainer m_videoInlineLayer;
+ PlatformLayerContainer m_videoFullscreenLayer;
Optional<LayerHostingContextID> m_fullscreenLayerHostingContextId;
RemoteMediaPlayerManager& m_manager;
WebCore::MediaPlayerEnums::MediaEngineIdentifier m_remoteEngineIdentifier;
Modified: trunk/Source/WebKit/WebProcess/GPU/media/VideoLayerRemote.h (258780 => 258781)
--- trunk/Source/WebKit/WebProcess/GPU/media/VideoLayerRemote.h 2020-03-20 19:56:49 UTC (rev 258780)
+++ trunk/Source/WebKit/WebProcess/GPU/media/VideoLayerRemote.h 2020-03-20 20:04:30 UTC (rev 258781)
@@ -28,16 +28,14 @@
#if ENABLE(GPU_PROCESS)
#include "LayerHostingContext.h"
-#include <wtf/RetainPtr.h>
+#include <WebCore/PlatformLayer.h>
-OBJC_CLASS CALayer;
+namespace WebKit {
class MediaPlayerPrivateRemote;
-namespace WebKit {
+PlatformLayerContainer createVideoLayerRemote(MediaPlayerPrivateRemote*, LayerHostingContextID);
-RetainPtr<PlatformLayer> createVideoLayerRemote(MediaPlayerPrivateRemote*, LayerHostingContextID);
-
} // namespace WebKit
#endif
Modified: trunk/Source/WebKit/WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm (258780 => 258781)
--- trunk/Source/WebKit/WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm 2020-03-20 19:56:49 UTC (rev 258780)
+++ trunk/Source/WebKit/WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm 2020-03-20 20:04:30 UTC (rev 258781)
@@ -36,7 +36,7 @@
#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
-RetainPtr<PlatformLayer> MediaPlayerPrivateRemote::createVideoFullscreenLayer()
+PlatformLayerContainer MediaPlayerPrivateRemote::createVideoFullscreenLayer()
{
if (!m_fullscreenLayerHostingContextId)
return nullptr;
Modified: trunk/Source/WebKit/WebProcess/GPU/media/cocoa/VideoLayerRemoteCocoa.mm (258780 => 258781)
--- trunk/Source/WebKit/WebProcess/GPU/media/cocoa/VideoLayerRemoteCocoa.mm 2020-03-20 19:56:49 UTC (rev 258780)
+++ trunk/Source/WebKit/WebProcess/GPU/media/cocoa/VideoLayerRemoteCocoa.mm 2020-03-20 20:04:30 UTC (rev 258781)
@@ -151,7 +151,7 @@
namespace WebKit {
-RetainPtr<CALayer> createVideoLayerRemote(MediaPlayerPrivateRemote* mediaPlayerPrivateRemote, LayerHostingContextID contextId)
+PlatformLayerContainer createVideoLayerRemote(MediaPlayerPrivateRemote* mediaPlayerPrivateRemote, LayerHostingContextID contextId)
{
// Initially, all the layers will be empty (both width and height are 0) and invisible.
// The renderer will change the sizes of WKVideoLayerRemote to trigger layout of sublayers and make them visible.
Modified: trunk/Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h (258780 => 258781)
--- trunk/Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h 2020-03-20 19:56:49 UTC (rev 258780)
+++ trunk/Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h 2020-03-20 20:04:30 UTC (rev 258781)
@@ -66,7 +66,7 @@
Ref<IPC::Connection> m_connection;
SampleBufferDisplayLayerIdentifier m_identifier;
- RetainPtr<PlatformLayer> m_videoLayer;
+ PlatformLayerContainer m_videoLayer;
bool m_didFail { false };
};