Diff
Modified: trunk/Source/WebCore/ChangeLog (254777 => 254778)
--- trunk/Source/WebCore/ChangeLog 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebCore/ChangeLog 2020-01-18 00:40:16 UTC (rev 254778)
@@ -1,3 +1,16 @@
+2020-01-17 Matt Lewis <jlew...@apple.com>
+
+ Unreviewed, rolling out r254688.
+
+ This caused internal test crashes.
+
+ Reverted changeset:
+
+ "Add support for MediaStream video track rendering in
+ GPUProcess"
+ https://bugs.webkit.org/show_bug.cgi?id=206286
+ https://trac.webkit.org/changeset/254688
+
2020-01-17 Alex Christensen <achristen...@webkit.org>
Don't call CFURLRequestSetShouldStartSynchronously from Catalyst WebKit
Modified: trunk/Source/WebCore/SourcesCocoa.txt (254777 => 254778)
--- trunk/Source/WebCore/SourcesCocoa.txt 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebCore/SourcesCocoa.txt 2020-01-18 00:40:16 UTC (rev 254778)
@@ -230,7 +230,6 @@
platform/graphics/angle/GraphicsContextGLANGLE.cpp @no-unify
platform/graphics/angle/TemporaryANGLESetting.cpp @no-unify
-platform/graphics/avfoundation/SampleBufferDisplayLayer.cpp
platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm @no-unify
platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm @no-unify
platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm @no-unify
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (254777 => 254778)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2020-01-18 00:40:16 UTC (rev 254778)
@@ -7280,7 +7280,6 @@
3FFFF9A7159D9A550020BBD5 /* WebKitCSSViewportRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitCSSViewportRule.h; sourceTree = "<group>"; };
3FFFF9AB159D9B060020BBD5 /* ViewportStyleResolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ViewportStyleResolver.cpp; sourceTree = "<group>"; };
3FFFF9AC159D9B060020BBD5 /* ViewportStyleResolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewportStyleResolver.h; sourceTree = "<group>"; };
- 41024FC823CF254F00FDF98E /* SampleBufferDisplayLayer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SampleBufferDisplayLayer.cpp; sourceTree = "<group>"; };
410626A72280A22A006D1B59 /* JSAudioNodeCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioNodeCustom.cpp; sourceTree = "<group>"; };
4107908A1FC3E4F20061B27A /* ClientOrigin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClientOrigin.h; sourceTree = "<group>"; };
410938282347799A009428BA /* JSAbortControllerCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAbortControllerCustom.cpp; sourceTree = "<group>"; };
@@ -16333,7 +16332,6 @@
076F0D0A12B8192700C26AA4 /* MediaPlayerPrivateAVFoundation.h */,
CDBEAEAB19D92B6C00BEBA88 /* MediaSelectionGroupAVFObjC.h */,
CDBEAEAA19D92B6C00BEBA88 /* MediaSelectionGroupAVFObjC.mm */,
- 41024FC823CF254F00FDF98E /* SampleBufferDisplayLayer.cpp */,
414598BE23C8AAB8002B9CC8 /* SampleBufferDisplayLayer.h */,
CD336F6317FA0A4D00DDDCD0 /* VideoTrackPrivateAVF.h */,
0709D7901AE5557E004E42F8 /* WebMediaSessionManagerMac.cpp */,
Deleted: trunk/Source/WebCore/platform/graphics/avfoundation/SampleBufferDisplayLayer.cpp (254777 => 254778)
--- trunk/Source/WebCore/platform/graphics/avfoundation/SampleBufferDisplayLayer.cpp 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/SampleBufferDisplayLayer.cpp 2020-01-18 00:40:16 UTC (rev 254778)
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2020 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "SampleBufferDisplayLayer.h"
-
-#include "LocalSampleBufferDisplayLayer.h"
-
-namespace WebCore {
-
-SampleBufferDisplayLayer::LayerCreator SampleBufferDisplayLayer::m_layerCreator = nullptr;
-void SampleBufferDisplayLayer::setCreator(LayerCreator creator)
-{
- m_layerCreator = creator;
-}
-
-std::unique_ptr<SampleBufferDisplayLayer> SampleBufferDisplayLayer::create(Client& client, bool hideRootLayer, IntSize size)
-{
- if (m_layerCreator)
- return m_layerCreator(client, hideRootLayer, size);
-
-#if ENABLE(MEDIA_STREAM) && USE(AVFOUNDATION)
- return LocalSampleBufferDisplayLayer::create(client, hideRootLayer, size);
-#else
- return nullptr;
-#endif
-}
-
-}
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/SampleBufferDisplayLayer.h (254777 => 254778)
--- trunk/Source/WebCore/platform/graphics/avfoundation/SampleBufferDisplayLayer.h 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/SampleBufferDisplayLayer.h 2020-01-18 00:40:16 UTC (rev 254778)
@@ -42,13 +42,11 @@
public:
virtual ~Client() = default;
virtual void sampleBufferDisplayLayerStatusDidChange(SampleBufferDisplayLayer&) = 0;
+ virtual void sampleBufferDisplayLayerBoundsDidChange(SampleBufferDisplayLayer&) = 0;
virtual WTF::MediaTime streamTime() const = 0;
};
- WEBCORE_EXPORT static std::unique_ptr<SampleBufferDisplayLayer> create(Client&, bool hideRootLayer, IntSize);
- using LayerCreator = std::unique_ptr<SampleBufferDisplayLayer> (*)(Client&, bool hideRootLayer, IntSize);
- WEBCORE_EXPORT static void setCreator(LayerCreator);
-
+ explicit SampleBufferDisplayLayer(Client&);
virtual ~SampleBufferDisplayLayer() = default;
virtual bool didFail() const = 0;
@@ -68,12 +66,7 @@
virtual PlatformLayer* rootLayer() = 0;
protected:
- explicit SampleBufferDisplayLayer(Client&);
-
WeakPtr<Client> m_client;
-
-private:
- static LayerCreator m_layerCreator;
};
inline SampleBufferDisplayLayer::SampleBufferDisplayLayer(Client& client)
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h (254777 => 254778)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h 2020-01-18 00:40:16 UTC (rev 254778)
@@ -40,7 +40,7 @@
class WEBCORE_EXPORT LocalSampleBufferDisplayLayer final : public SampleBufferDisplayLayer, public CanMakeWeakPtr<LocalSampleBufferDisplayLayer> {
WTF_MAKE_FAST_ALLOCATED;
public:
- static std::unique_ptr<LocalSampleBufferDisplayLayer> create(Client&, bool hideRootLayer, IntSize);
+ static std::unique_ptr<SampleBufferDisplayLayer> create(Client&, bool hideRootLayer, IntSize);
LocalSampleBufferDisplayLayer(RetainPtr<AVSampleBufferDisplayLayer>&&, Client&, bool hideRootLayer, IntSize);
~LocalSampleBufferDisplayLayer();
@@ -54,8 +54,7 @@
PlatformLayer* rootLayer() final;
- void updateRootLayerBoundsAndPosition(CGRect, CGPoint);
-
+private:
bool didFail() const final;
void updateDisplayMode(bool hideDisplayLayer, bool hideRootLayer) final;
@@ -70,7 +69,8 @@
void enqueueSample(MediaSample&) final;
void clearEnqueuedSamples() final;
-private:
+ void ensureLayers();
+
void removeOldSamplesFromPendingQueue();
void addSampleToPendingQueue(MediaSample&);
void requestNotificationWhenReadyForVideoData();
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm (254777 => 254778)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm 2020-01-18 00:40:16 UTC (rev 254778)
@@ -37,7 +37,6 @@
#import <QuartzCore/CATransaction.h>
#import <wtf/MainThread.h>
-#import <wtf/cf/TypeCastsCF.h>
#import <pal/cocoa/AVFoundationSoftLink.h>
@@ -49,8 +48,8 @@
- (id)initWithParent:(LocalSampleBufferDisplayLayer*)callback;
- (void)invalidate;
-- (void)start;
-- (void)stop;
+- (void)beginObservingLayers;
+- (void)stopObservingLayers;
@end
@implementation WebAVSampleBufferStatusChangeListener
@@ -73,26 +72,32 @@
- (void)invalidate
{
- [self stop];
+ [self stopObservingLayers];
_parent = nullptr;
}
-- (void)start
+- (void)beginObservingLayers
{
ASSERT(_parent);
ASSERT(_parent->displayLayer());
+ ASSERT(_parent->rootLayer());
[_parent->displayLayer() addObserver:self forKeyPath:@"status" options:NSKeyValueObservingOptionNew context:nil];
[_parent->displayLayer() addObserver:self forKeyPath:@"error" options:NSKeyValueObservingOptionNew context:nil];
+ [_parent->rootLayer() addObserver:self forKeyPath:@"bounds" options:NSKeyValueObservingOptionNew context:nil];
}
-- (void)stop
+- (void)stopObservingLayers
{
- if (!_parent || !_parent->displayLayer())
+ if (!_parent)
return;
- [_parent->displayLayer() removeObserver:self forKeyPath:@"status"];
- [_parent->displayLayer() removeObserver:self forKeyPath:@"error"];
+ if (_parent->displayLayer()) {
+ [_parent->displayLayer() removeObserver:self forKeyPath:@"status"];
+ [_parent->displayLayer() removeObserver:self forKeyPath:@"error"];
+ }
+ if (_parent->rootLayer())
+ [_parent->rootLayer() removeObserver:self forKeyPath:@"bounds"];
}
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
@@ -99,7 +104,6 @@
{
UNUSED_PARAM(context);
UNUSED_PARAM(keyPath);
- UNUSED_PARAM(change);
ASSERT(_parent);
if (!_parent)
@@ -128,6 +132,29 @@
return;
}
}
+
+ if ([[change valueForKey:NSKeyValueChangeNotificationIsPriorKey] boolValue])
+ return;
+
+ if ((CALayer *)object == _parent->rootLayer()) {
+ if ([keyPath isEqualToString:@"bounds"]) {
+ if (!_parent)
+ return;
+
+ if (isMainThread()) {
+ _parent->rootLayerBoundsDidChange();
+ return;
+ }
+
+ callOnMainThread([protectedSelf = RetainPtr<WebAVSampleBufferStatusChangeListener>(self)] {
+ if (!protectedSelf->_parent)
+ return;
+
+ protectedSelf->_parent->rootLayerBoundsDidChange();
+ });
+ }
+ }
+
}
@end
@@ -142,7 +169,7 @@
[CATransaction commit];
}
-std::unique_ptr<LocalSampleBufferDisplayLayer> LocalSampleBufferDisplayLayer::create(Client& client, bool hideRootLayer, IntSize size)
+std::unique_ptr<SampleBufferDisplayLayer> LocalSampleBufferDisplayLayer::create(Client& client, bool hideRootLayer, IntSize size)
{
auto sampleBufferDisplayLayer = adoptNS([PAL::allocAVSampleBufferDisplayLayerInstance() init]);
if (!sampleBufferDisplayLayer)
@@ -169,7 +196,7 @@
m_rootLayer.get().bounds = CGRectMake(0, 0, size.width(), size.height());
- [m_statusChangeListener start];
+ [m_statusChangeListener beginObservingLayers];
[m_rootLayer addSublayer:m_sampleBufferDisplayLayer.get()];
@@ -181,7 +208,7 @@
LocalSampleBufferDisplayLayer::~LocalSampleBufferDisplayLayer()
{
- m_statusChangeListener = nullptr;
+ [m_statusChangeListener stopObservingLayers];
m_pendingVideoSampleQueue.clear();
@@ -208,6 +235,14 @@
// FIXME: Log error.
}
+void LocalSampleBufferDisplayLayer::rootLayerBoundsDidChange()
+{
+ ASSERT(isMainThread());
+ if (!m_client)
+ return;
+ m_client->sampleBufferDisplayLayerBoundsDidChange(*this);
+}
+
PlatformLayer* LocalSampleBufferDisplayLayer::displayLayer()
{
return m_sampleBufferDisplayLayer.get();
@@ -254,16 +289,6 @@
});
}
-void LocalSampleBufferDisplayLayer::updateRootLayerBoundsAndPosition(CGRect videoBounds, CGPoint position)
-{
- runWithoutAnimations([&] {
- m_rootLayer.get().bounds = videoBounds;
- m_rootLayer.get().position = position;
- m_sampleBufferDisplayLayer.get().bounds = videoBounds;
- m_sampleBufferDisplayLayer.get().position = position;
- });
-}
-
void LocalSampleBufferDisplayLayer::flush()
{
[m_sampleBufferDisplayLayer flush];
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h (254777 => 254778)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h 2020-01-18 00:40:16 UTC (rev 254778)
@@ -36,7 +36,7 @@
#include <wtf/LoggerHelper.h>
OBJC_CLASS AVSampleBufferDisplayLayer;
-OBJC_CLASS WebRootSampleBufferBoundsChangeListener;
+OBJC_CLASS WebAVSampleBufferStatusChangeListener;
namespace PAL {
class Clock;
@@ -82,9 +82,6 @@
WTFLogChannel& logChannel() const final;
#endif
- PlatformLayer* rootLayer() const;
- void rootLayerBoundsDidChange();
-
private:
// MediaPlayerPrivateInterface
@@ -247,6 +244,7 @@
// SampleBufferDisplayLayer::Client
void sampleBufferDisplayLayerStatusDidChange(SampleBufferDisplayLayer&) final;
+ void sampleBufferDisplayLayerBoundsDidChange(SampleBufferDisplayLayer&) final;
#if !RELEASE_LOG_DISABLED
Ref<const Logger> m_logger;
@@ -253,8 +251,6 @@
const void* m_logIdentifier;
#endif
- RetainPtr<WebRootSampleBufferBoundsChangeListener> m_boundsChangeListener;
-
bool m_videoMirrored { false };
bool m_playing { false };
bool m_muted { false };
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm (254777 => 254778)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm 2020-01-18 00:40:16 UTC (rev 254778)
@@ -48,91 +48,6 @@
#import <pal/cf/CoreMediaSoftLink.h>
#import <pal/cocoa/AVFoundationSoftLink.h>
-@interface WebRootSampleBufferBoundsChangeListener : NSObject {
- WebCore::MediaPlayerPrivateMediaStreamAVFObjC* _parent;
-}
-
-- (id)initWithParent:(WebCore::MediaPlayerPrivateMediaStreamAVFObjC*)callback;
-- (void)invalidate;
-- (void)start;
-- (void)stop;
-@end
-
-@implementation WebRootSampleBufferBoundsChangeListener
-
-- (id)initWithParent:(WebCore::MediaPlayerPrivateMediaStreamAVFObjC*)parent
-{
- if (!(self = [super init]))
- return nil;
-
- _parent = parent;
-
- return self;
-}
-
-- (void)dealloc
-{
- [self invalidate];
- [super dealloc];
-}
-
-- (void)invalidate
-{
- [self stop];
- _parent = nullptr;
-}
-
-- (void)start
-{
- ASSERT(_parent);
- ASSERT(_parent->rootLayer());
-
- [_parent->rootLayer() addObserver:self forKeyPath:@"bounds" options:NSKeyValueObservingOptionNew context:nil];
-}
-
-- (void)stop
-{
- if (!_parent)
- return;
-
- if (_parent->rootLayer())
- [_parent->rootLayer() removeObserver:self forKeyPath:@"bounds"];
-}
-
-- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
-{
- UNUSED_PARAM(context);
- UNUSED_PARAM(keyPath);
- ASSERT(_parent);
-
- if (!_parent)
- return;
-
- if ([[change valueForKey:NSKeyValueChangeNotificationIsPriorKey] boolValue])
- return;
-
- if ((CALayer *)object == _parent->rootLayer()) {
- if ([keyPath isEqualToString:@"bounds"]) {
- if (!_parent)
- return;
-
- if (isMainThread()) {
- _parent->rootLayerBoundsDidChange();
- return;
- }
-
- callOnMainThread([protectedSelf = RetainPtr<WebRootSampleBufferBoundsChangeListener>(self)] {
- if (!protectedSelf->_parent)
- return;
-
- protectedSelf->_parent->rootLayerBoundsDidChange();
- });
- }
- }
-
-}
-@end
-
namespace WebCore {
using namespace PAL;
@@ -149,7 +64,6 @@
, m_logger(player->mediaPlayerLogger())
, m_logIdentifier(player->mediaPlayerLogIdentifier())
#endif
- , m_boundsChangeListener(adoptNS([[WebRootSampleBufferBoundsChangeListener alloc] initWithParent:this]))
{
INFO_LOG(LOGIDENTIFIER);
}
@@ -168,8 +82,6 @@
track->removeObserver(*this);
}
- [m_boundsChangeListener stop];
-
destroyLayers();
auto audioTrackMap = WTFMove(m_audioTrackMap);
@@ -372,7 +284,7 @@
return;
auto size = snappedIntRect(m_player->playerContentBoxRect()).size();
- m_sampleBufferDisplayLayer = SampleBufferDisplayLayer::create(*this, hideRootLayer(), size);
+ m_sampleBufferDisplayLayer = LocalSampleBufferDisplayLayer::create(*this, hideRootLayer(), size);
if (!m_sampleBufferDisplayLayer) {
ERROR_LOG(LOGIDENTIFIER, "Creating the SampleBufferDisplayLayer failed.");
@@ -383,8 +295,6 @@
updateDisplayLayer();
m_videoFullscreenLayerManager->setVideoLayer(m_sampleBufferDisplayLayer->rootLayer(), size);
-
- [m_boundsChangeListener start];
}
void MediaPlayerPrivateMediaStreamAVFObjC::destroyLayers()
@@ -455,11 +365,6 @@
INFO_LOG(LOGIDENTIFIER);
}
-PlatformLayer* MediaPlayerPrivateMediaStreamAVFObjC::rootLayer() const
-{
- return m_sampleBufferDisplayLayer ? m_sampleBufferDisplayLayer->rootLayer() : nullptr;
-}
-
PlatformLayer* MediaPlayerPrivateMediaStreamAVFObjC::platformLayer() const
{
if (!m_sampleBufferDisplayLayer || !m_sampleBufferDisplayLayer->rootLayer() || m_displayMode == None)
@@ -1043,7 +948,7 @@
if (!m_sampleBufferDisplayLayer)
return;
- auto bounds = rootLayer().bounds;
+ auto bounds = m_sampleBufferDisplayLayer->bounds();
auto videoBounds = bounds;
if (m_videoRotation == MediaSample::VideoRotation::Right || m_videoRotation == MediaSample::VideoRotation::Left)
std::swap(videoBounds.size.width, videoBounds.size.height);
@@ -1051,7 +956,7 @@
m_sampleBufferDisplayLayer->updateBoundsAndPosition(videoBounds, { bounds.size.width / 2, bounds.size.height / 2});
}
-void MediaPlayerPrivateMediaStreamAVFObjC::rootLayerBoundsDidChange()
+void MediaPlayerPrivateMediaStreamAVFObjC::sampleBufferDisplayLayerBoundsDidChange(SampleBufferDisplayLayer&)
{
updateDisplayLayer();
}
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h (254777 => 254778)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h 2020-01-18 00:40:16 UTC (rev 254778)
@@ -39,8 +39,6 @@
static Ref<MediaSampleAVFObjC> create(CMSampleBufferRef sample, VideoRotation rotation = VideoRotation::None, bool mirrored = false) { return adoptRef(*new MediaSampleAVFObjC(sample, rotation, mirrored)); }
static RefPtr<MediaSampleAVFObjC> createImageSample(Vector<uint8_t>&&, unsigned long width, unsigned long height);
- WEBCORE_EXPORT static void setAsDisplayImmediately(MediaSample&);
-
RefPtr<JSC::Uint8ClampedArray> getRGBAImageData() const override;
MediaTime presentationTime() const override;
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm (254777 => 254778)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm 2020-01-18 00:40:16 UTC (rev 254778)
@@ -311,15 +311,6 @@
#endif
}
-void MediaSampleAVFObjC::setAsDisplayImmediately(MediaSample& sample)
-{
- CFArrayRef attachmentsArray = CMSampleBufferGetSampleAttachmentsArray(sample.platformSample().sample.cmSampleBuffer, true);
- for (CFIndex i = 0; i < CFArrayGetCount(attachmentsArray); ++i) {
- CFMutableDictionaryRef attachments = checked_cf_cast<CFMutableDictionaryRef>(CFArrayGetValueAtIndex(attachmentsArray, i));
- CFDictionarySetValue(attachments, kCMSampleAttachmentKey_DisplayImmediately, kCFBooleanTrue);
- }
-}
-
String MediaSampleAVFObjC::toJSONString() const
{
auto object = JSON::Object::create();
Modified: trunk/Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp (254777 => 254778)
--- trunk/Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp 2020-01-18 00:40:16 UTC (rev 254778)
@@ -42,7 +42,6 @@
#include "SharedBuffer.h"
#include <CoreGraphics/CGContext.h>
#include <CoreGraphics/CGPDFDocument.h>
-#include <pal/spi/cg/CoreGraphicsSPI.h>
#include <wtf/MathExtras.h>
#include <wtf/RAMSize.h>
#include <wtf/RetainPtr.h>
Modified: trunk/Source/WebKit/ChangeLog (254777 => 254778)
--- trunk/Source/WebKit/ChangeLog 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebKit/ChangeLog 2020-01-18 00:40:16 UTC (rev 254778)
@@ -1,3 +1,16 @@
+2020-01-17 Matt Lewis <jlew...@apple.com>
+
+ Unreviewed, rolling out r254688.
+
+ This caused internal test crashes.
+
+ Reverted changeset:
+
+ "Add support for MediaStream video track rendering in
+ GPUProcess"
+ https://bugs.webkit.org/show_bug.cgi?id=206286
+ https://trac.webkit.org/changeset/254688
+
2020-01-17 Daniel Bates <daba...@apple.com>
[iOS] ASSERTION FAILED: ASSERT_NOT_REACHED() in selectionChangedWithTouch(WKContentView*, WebCore::IntPoint const&, unsigned int, unsigned int, WebKit::CallbackBase::Error)
Modified: trunk/Source/WebKit/DerivedSources-input.xcfilelist (254777 => 254778)
--- trunk/Source/WebKit/DerivedSources-input.xcfilelist 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebKit/DerivedSources-input.xcfilelist 2020-01-18 00:40:16 UTC (rev 254778)
@@ -24,8 +24,6 @@
$(PROJECT_DIR)/GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererManager.messages.in
$(PROJECT_DIR)/GPUProcess/webrtc/RemoteMediaRecorder.messages.in
$(PROJECT_DIR)/GPUProcess/webrtc/RemoteMediaRecorderManager.messages.in
-$(PROJECT_DIR)/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.messages.in
-$(PROJECT_DIR)/GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.messages.in
$(PROJECT_DIR)/NetworkProcess/Cookies/WebCookieManager.messages.in
$(PROJECT_DIR)/NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.messages.in
$(PROJECT_DIR)/NetworkProcess/IndexedDB/WebIDBServer.messages.in
@@ -110,7 +108,6 @@
$(PROJECT_DIR)/WebProcess/GPU/media/RemoteMediaPlayerManager.messages.in
$(PROJECT_DIR)/WebProcess/GPU/webrtc/LibWebRTCCodecs.messages.in
$(PROJECT_DIR)/WebProcess/GPU/webrtc/LibWebRTCRemoteCodecs.messages.in
-$(PROJECT_DIR)/WebProcess/GPU/webrtc/SampleBufferDisplayLayer.messages.in
$(PROJECT_DIR)/WebProcess/Geolocation/WebGeolocationManager.messages.in
$(PROJECT_DIR)/WebProcess/Network/NetworkProcessConnection.messages.in
$(PROJECT_DIR)/WebProcess/Network/WebResourceLoader.messages.in
Modified: trunk/Source/WebKit/DerivedSources-output.xcfilelist (254777 => 254778)
--- trunk/Source/WebKit/DerivedSources-output.xcfilelist 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebKit/DerivedSources-output.xcfilelist 2020-01-18 00:40:16 UTC (rev 254778)
@@ -151,12 +151,6 @@
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteObjectRegistryMessageReceiver.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteObjectRegistryMessages.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteObjectRegistryMessagesReplies.h
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteSampleBufferDisplayLayerManagerMessageReceiver.cpp
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteSampleBufferDisplayLayerManagerMessages.h
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteSampleBufferDisplayLayerManagerMessagesReplies.h
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteSampleBufferDisplayLayerMessageReceiver.cpp
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteSampleBufferDisplayLayerMessages.h
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteSampleBufferDisplayLayerMessagesReplies.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteScrollingCoordinatorMessageReceiver.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteScrollingCoordinatorMessages.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteScrollingCoordinatorMessagesReplies.h
@@ -166,9 +160,6 @@
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteWebInspectorUIMessageReceiver.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteWebInspectorUIMessages.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteWebInspectorUIMessagesReplies.h
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/SampleBufferDisplayLayerMessageReceiver.cpp
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/SampleBufferDisplayLayerMessages.h
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/SampleBufferDisplayLayerMessagesReplies.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/SecItemShimProxyMessageReceiver.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/SecItemShimProxyMessages.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/SecItemShimProxyMessagesReplies.h
Modified: trunk/Source/WebKit/DerivedSources.make (254777 => 254778)
--- trunk/Source/WebKit/DerivedSources.make 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebKit/DerivedSources.make 2020-01-18 00:40:16 UTC (rev 254778)
@@ -150,12 +150,9 @@
RemoteMediaRecorderManager \
RemoteMediaResourceManager \
RemoteObjectRegistry \
- RemoteSampleBufferDisplayLayer \
- RemoteSampleBufferDisplayLayerManager \
RemoteScrollingCoordinator \
RemoteWebInspectorProxy \
RemoteWebInspectorUI \
- SampleBufferDisplayLayer \
SecItemShimProxy \
ServiceWorkerFetchTask \
SmartMagnificationController \
Modified: trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp (254777 => 254778)
--- trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp 2020-01-18 00:40:16 UTC (rev 254778)
@@ -49,9 +49,6 @@
#include "RemoteMediaRecorderMessages.h"
#include "RemoteMediaResourceManager.h"
#include "RemoteMediaResourceManagerMessages.h"
-#include "RemoteSampleBufferDisplayLayerManager.h"
-#include "RemoteSampleBufferDisplayLayerManagerMessages.h"
-#include "RemoteSampleBufferDisplayLayerMessages.h"
#include "RemoteScrollingCoordinatorTransaction.h"
#include "UserMediaCaptureManagerProxy.h"
#include "UserMediaCaptureManagerProxyMessages.h"
@@ -165,14 +162,6 @@
return *m_audioTrackRendererManager;
}
-
-RemoteSampleBufferDisplayLayerManager& GPUConnectionToWebProcess::sampleBufferDisplayLayerManager()
-{
- if (!m_sampleBufferDisplayLayerManager)
- m_sampleBufferDisplayLayerManager = makeUnique<RemoteSampleBufferDisplayLayerManager>(m_connection.copyRef());
-
- return *m_sampleBufferDisplayLayerManager;
-}
#endif
#endif
@@ -220,14 +209,6 @@
audioTrackRendererManager().didReceiveRendererMessage(connection, decoder);
return;
}
- if (decoder.messageReceiverName() == Messages::RemoteSampleBufferDisplayLayerManager::messageReceiverName()) {
- sampleBufferDisplayLayerManager().didReceiveMessageFromWebProcess(connection, decoder);
- return;
- }
- if (decoder.messageReceiverName() == Messages::RemoteSampleBufferDisplayLayer::messageReceiverName()) {
- sampleBufferDisplayLayerManager().didReceiveLayerMessage(connection, decoder);
- return;
- }
#endif
#endif
#if PLATFORM(COCOA) && USE(LIBWEBRTC)
@@ -250,13 +231,7 @@
userMediaCaptureManagerProxy().didReceiveSyncMessageFromGPUProcess(connection, decoder, replyEncoder);
return;
}
-#if PLATFORM(COCOA) && ENABLE(VIDEO_TRACK)
- if (decoder.messageReceiverName() == Messages::RemoteSampleBufferDisplayLayerManager::messageReceiverName()) {
- sampleBufferDisplayLayerManager().didReceiveSyncMessageFromWebProcess(connection, decoder, replyEncoder);
- return;
- }
#endif
-#endif
ASSERT_NOT_REACHED();
}
Modified: trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.h (254777 => 254778)
--- trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.h 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.h 2020-01-18 00:40:16 UTC (rev 254778)
@@ -44,7 +44,6 @@
class RemoteMediaPlayerManagerProxy;
class RemoteMediaRecorderManager;
class RemoteMediaResourceManager;
-class RemoteSampleBufferDisplayLayerManager;
class UserMediaCaptureManagerProxy;
class GPUConnectionToWebProcess
@@ -77,7 +76,6 @@
RemoteMediaRecorderManager& mediaRecorderManager();
#if ENABLE(VIDEO_TRACK)
RemoteAudioMediaStreamTrackRendererManager& audioTrackRendererManager();
- RemoteSampleBufferDisplayLayerManager& sampleBufferDisplayLayerManager();
#endif
#endif
@@ -100,7 +98,6 @@
std::unique_ptr<RemoteMediaRecorderManager> m_remoteMediaRecorderManager;
#if ENABLE(VIDEO_TRACK)
std::unique_ptr<RemoteAudioMediaStreamTrackRendererManager> m_audioTrackRendererManager;
- std::unique_ptr<RemoteSampleBufferDisplayLayerManager> m_sampleBufferDisplayLayerManager;
#endif
#endif
#if PLATFORM(COCOA) && USE(LIBWEBRTC)
Deleted: trunk/Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp (254777 => 254778)
--- trunk/Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp 2020-01-18 00:40:16 UTC (rev 254778)
@@ -1,143 +0,0 @@
-/*
- * Copyright (C) 2020 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "RemoteSampleBufferDisplayLayer.h"
-
-#if PLATFORM(COCOA) && ENABLE(GPU_PROCESS) && ENABLE(VIDEO_TRACK) && ENABLE(MEDIA_STREAM)
-
-#include "SampleBufferDisplayLayerMessages.h"
-#include <WebCore/ImageTransferSessionVT.h>
-#include <WebCore/LocalSampleBufferDisplayLayer.h>
-#include <WebCore/MediaSampleAVFObjC.h>
-#include <WebCore/RemoteVideoSample.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-std::unique_ptr<RemoteSampleBufferDisplayLayer> RemoteSampleBufferDisplayLayer::create(SampleBufferDisplayLayerIdentifier identifier, Ref<IPC::Connection>&& connection, bool hideRootLayer, IntSize size)
-{
- auto layer = std::unique_ptr<RemoteSampleBufferDisplayLayer>(new RemoteSampleBufferDisplayLayer(identifier, WTFMove(connection), hideRootLayer, size));
- return layer->m_sampleBufferDisplayLayer ? WTFMove(layer) : nullptr;
-}
-
-RemoteSampleBufferDisplayLayer::RemoteSampleBufferDisplayLayer(SampleBufferDisplayLayerIdentifier identifier, Ref<IPC::Connection>&& connection, bool hideRootLayer, IntSize size)
- : m_identifier(identifier)
- , m_connection(WTFMove(connection))
- , m_sampleBufferDisplayLayer(LocalSampleBufferDisplayLayer::create(*this, hideRootLayer, size))
-{
- ASSERT(m_sampleBufferDisplayLayer);
- if (!m_sampleBufferDisplayLayer)
- return;
-
- m_layerHostingContext = LayerHostingContext::createForExternalHostingProcess();
- m_layerHostingContext->setRootLayer(m_sampleBufferDisplayLayer->rootLayer());
-}
-
-RemoteSampleBufferDisplayLayer::~RemoteSampleBufferDisplayLayer()
-{
-}
-
-Optional<LayerHostingContextID> RemoteSampleBufferDisplayLayer::contextID()
-{
- return m_layerHostingContext->contextID();
-}
-
-CGRect RemoteSampleBufferDisplayLayer::bounds() const
-{
- return m_sampleBufferDisplayLayer->bounds();
-}
-
-void RemoteSampleBufferDisplayLayer::updateDisplayMode(bool hideDisplayLayer, bool hideRootLayer)
-{
- m_sampleBufferDisplayLayer->updateDisplayMode(hideDisplayLayer, hideRootLayer);
-}
-
-void RemoteSampleBufferDisplayLayer::updateAffineTransform(CGAffineTransform transform)
-{
- m_sampleBufferDisplayLayer->updateAffineTransform(transform);
-}
-
-void RemoteSampleBufferDisplayLayer::updateBoundsAndPosition(CGRect bounds, CGPoint position)
-{
- m_sampleBufferDisplayLayer->updateRootLayerBoundsAndPosition(bounds, position);
-}
-
-void RemoteSampleBufferDisplayLayer::flush()
-{
- m_sampleBufferDisplayLayer->flush();
-}
-
-void RemoteSampleBufferDisplayLayer::flushAndRemoveImage()
-{
- m_sampleBufferDisplayLayer->flushAndRemoveImage();
-}
-
-void RemoteSampleBufferDisplayLayer::enqueueSample(WebCore::RemoteVideoSample&& remoteSample)
-{
- m_mediaTime = remoteSample.time();
-
- if (!m_imageTransferSession || m_imageTransferSession->pixelFormat() != remoteSample.videoFormat())
- m_imageTransferSession = ImageTransferSessionVT::create(remoteSample.videoFormat());
-
- ASSERT(m_imageTransferSession);
- if (!m_imageTransferSession)
- return;
-
- auto sample = m_imageTransferSession->createMediaSample(remoteSample.surface(), remoteSample.time(), remoteSample.size());
-
- ASSERT(sample);
- if (!sample)
- return;
-
- MediaSampleAVFObjC::setAsDisplayImmediately(*sample);
- m_sampleBufferDisplayLayer->enqueueSample(*sample);
-}
-
-void RemoteSampleBufferDisplayLayer::clearEnqueuedSamples()
-{
- m_sampleBufferDisplayLayer->clearEnqueuedSamples();
-}
-
-IPC::Connection* RemoteSampleBufferDisplayLayer::messageSenderConnection() const
-{
- return m_connection.ptr();
-}
-
-void RemoteSampleBufferDisplayLayer::sampleBufferDisplayLayerStatusDidChange(WebCore::SampleBufferDisplayLayer&)
-{
- send(Messages::SampleBufferDisplayLayer::SetDidFail { m_sampleBufferDisplayLayer->didFail() });
-}
-
-WTF::MediaTime RemoteSampleBufferDisplayLayer::streamTime() const
-{
- // This is only an approximation which will clear all samples enqueued in m_sampleBufferDisplayLayer except the one being pushed.
- return m_mediaTime;
-}
-
-}
-
-#endif // PLATFORM(COCOA) && ENABLE(GPU_PROCESS) && ENABLE(VIDEO_TRACK) && ENABLE(MEDIA_STREAM)
Deleted: trunk/Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.h (254777 => 254778)
--- trunk/Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.h 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.h 2020-01-18 00:40:16 UTC (rev 254778)
@@ -1,85 +0,0 @@
-/*
- * Copyright (C) 2020 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#if PLATFORM(COCOA) && ENABLE(GPU_PROCESS) && ENABLE(VIDEO_TRACK) && ENABLE(MEDIA_STREAM)
-
-#include "LayerHostingContext.h"
-#include "MessageReceiver.h"
-#include "MessageSender.h"
-#include "SampleBufferDisplayLayerIdentifier.h"
-#include <WebCore/SampleBufferDisplayLayer.h>
-
-namespace WebCore {
-class ImageTransferSessionVT;
-class LocalSampleBufferDisplayLayer;
-class RemoteVideoSample;
-};
-
-namespace WebKit {
-
-class RemoteSampleBufferDisplayLayer : public WebCore::SampleBufferDisplayLayer::Client, public IPC::MessageReceiver, private IPC::MessageSender {
- WTF_MAKE_FAST_ALLOCATED;
-public:
- static std::unique_ptr<RemoteSampleBufferDisplayLayer> create(SampleBufferDisplayLayerIdentifier, Ref<IPC::Connection>&&, bool hideRootLayer, WebCore::IntSize);
- ~RemoteSampleBufferDisplayLayer();
-
- // IPC::MessageReceiver
- void didReceiveMessage(IPC::Connection&, IPC::Decoder&) final;
-
- Optional<LayerHostingContextID> contextID();
- CGRect bounds() const;
-
-private:
- RemoteSampleBufferDisplayLayer(SampleBufferDisplayLayerIdentifier, Ref<IPC::Connection>&&, bool hideRootLayer, WebCore::IntSize);
-
- void updateDisplayMode(bool hideDisplayLayer, bool hideRootLayer);
- void updateAffineTransform(CGAffineTransform);
- void updateBoundsAndPosition(CGRect, CGPoint);
- void flush();
- void flushAndRemoveImage();
- void enqueueSample(WebCore::RemoteVideoSample&&);
- void clearEnqueuedSamples();
-
- // IPC::MessageSender
- IPC::Connection* messageSenderConnection() const final;
- uint64_t messageSenderDestinationID() const final { return m_identifier.toUInt64(); }
-
- // WebCore::SampleBufferDisplayLayer::Client
- void sampleBufferDisplayLayerStatusDidChange(WebCore::SampleBufferDisplayLayer&) final;
- WTF::MediaTime streamTime() const final;
-
- SampleBufferDisplayLayerIdentifier m_identifier;
- Ref<IPC::Connection> m_connection;
- std::unique_ptr<WebCore::ImageTransferSessionVT> m_imageTransferSession;
- std::unique_ptr<WebCore::LocalSampleBufferDisplayLayer> m_sampleBufferDisplayLayer;
- std::unique_ptr<LayerHostingContext> m_layerHostingContext;
- WTF::MediaTime m_mediaTime;
-};
-
-}
-
-#endif // PLATFORM(COCOA) && ENABLE(GPU_PROCESS) && ENABLE(VIDEO_TRACK) && ENABLE(MEDIA_STREAM)
Deleted: trunk/Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.messages.in (254777 => 254778)
--- trunk/Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.messages.in 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.messages.in 2020-01-18 00:40:16 UTC (rev 254778)
@@ -1,36 +0,0 @@
-# Copyright (C) 2020 Apple Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-# THE POSSIBILITY OF SUCH DAMAGE.
-
-#if PLATFORM(COCOA) && ENABLE(GPU_PROCESS) && ENABLE(VIDEO_TRACK) && ENABLE(MEDIA_STREAM)
-
-messages -> RemoteSampleBufferDisplayLayer NotRefCounted {
- UpdateDisplayMode(bool hideDisplayLayer, bool hideRootLayer)
- UpdateAffineTransform(CGAffineTransform transform)
- UpdateBoundsAndPosition(CGRect bounds, CGPoint position)
- Flush()
- FlushAndRemoveImage()
- EnqueueSample(WebCore::RemoteVideoSample sample)
- ClearEnqueuedSamples()
-}
-
-#endif
Deleted: trunk/Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp (254777 => 254778)
--- trunk/Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp 2020-01-18 00:40:16 UTC (rev 254778)
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2020 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "RemoteSampleBufferDisplayLayerManager.h"
-
-#if PLATFORM(COCOA) && ENABLE(GPU_PROCESS) && ENABLE(VIDEO_TRACK) && ENABLE(MEDIA_STREAM)
-
-#include "Decoder.h"
-#include "RemoteSampleBufferDisplayLayer.h"
-
-namespace WebKit {
-
-RemoteSampleBufferDisplayLayerManager::RemoteSampleBufferDisplayLayerManager(Ref<IPC::Connection>&& connection)
- : m_connection(WTFMove(connection))
-{
-}
-
-RemoteSampleBufferDisplayLayerManager::~RemoteSampleBufferDisplayLayerManager() = default;
-
-void RemoteSampleBufferDisplayLayerManager::didReceiveLayerMessage(IPC::Connection& connection, IPC::Decoder& decoder)
-{
- if (auto* layer = m_layers.get(makeObjectIdentifier<SampleBufferDisplayLayerIdentifierType>(decoder.destinationID())))
- layer->didReceiveMessage(connection, decoder);
-}
-
-// FIXME: We should refactor code to use an asynchronous IPC.
-void RemoteSampleBufferDisplayLayerManager::createLayer(SampleBufferDisplayLayerIdentifier identifier, bool hideRootLayer, IntSize size, Messages::RemoteSampleBufferDisplayLayerManager::CreateLayerDelayedReply&& reply)
-{
- ASSERT(!m_layers.contains(identifier));
- auto layer = RemoteSampleBufferDisplayLayer::create(identifier, m_connection.copyRef(), hideRootLayer, size);
- if (!layer)
- return reply({ }, { });
-
- reply(layer->contextID(), layer->bounds());
- m_layers.add(identifier, WTFMove(layer));
-}
-
-void RemoteSampleBufferDisplayLayerManager::releaseLayer(SampleBufferDisplayLayerIdentifier identifier)
-{
- ASSERT(m_layers.contains(identifier));
- m_layers.remove(identifier);
-}
-
-}
-
-#endif // PLATFORM(COCOA) && ENABLE(GPU_PROCESS) && ENABLE(VIDEO_TRACK) && ENABLE(MEDIA_STREAM)
Deleted: trunk/Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.h (254777 => 254778)
--- trunk/Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.h 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.h 2020-01-18 00:40:16 UTC (rev 254778)
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2020 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#if PLATFORM(COCOA) && ENABLE(GPU_PROCESS) && ENABLE(VIDEO_TRACK) && ENABLE(MEDIA_STREAM)
-
-#include "MessageReceiver.h"
-#include "RemoteSampleBufferDisplayLayerManagerMessagesReplies.h"
-#include "SampleBufferDisplayLayerIdentifier.h"
-#include <wtf/HashMap.h>
-
-namespace IPC {
-class Connection;
-class Decoder;
-}
-
-namespace WebKit {
-
-class RemoteSampleBufferDisplayLayer;
-
-class RemoteSampleBufferDisplayLayerManager final : private IPC::MessageReceiver {
- WTF_MAKE_FAST_ALLOCATED;
-public:
- explicit RemoteSampleBufferDisplayLayerManager(Ref<IPC::Connection>&&);
- ~RemoteSampleBufferDisplayLayerManager();
-
- void didReceiveLayerMessage(IPC::Connection&, IPC::Decoder&);
- void didReceiveMessageFromWebProcess(IPC::Connection& connection, IPC::Decoder& decoder) { didReceiveMessage(connection, decoder); }
- void didReceiveSyncMessageFromWebProcess(IPC::Connection& connection, IPC::Decoder& decoder, std::unique_ptr<IPC::Encoder>& encoder) { didReceiveSyncMessage(connection, decoder, encoder); }
-
-private:
- // IPC::MessageReceiver
- void didReceiveMessage(IPC::Connection&, IPC::Decoder&) final;
- void didReceiveSyncMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&) final;
-
- void createLayer(SampleBufferDisplayLayerIdentifier, bool hideRootLayer, WebCore::IntSize, Messages::RemoteSampleBufferDisplayLayerManager::CreateLayerDelayedReply&&);
- void releaseLayer(SampleBufferDisplayLayerIdentifier);
-
- Ref<IPC::Connection> m_connection;
- HashMap<SampleBufferDisplayLayerIdentifier, std::unique_ptr<RemoteSampleBufferDisplayLayer>> m_layers;
-};
-
-}
-
-#endif // PLATFORM(COCOA) && ENABLE(GPU_PROCESS) && ENABLE(VIDEO_TRACK) && ENABLE(MEDIA_STREAM)
Deleted: trunk/Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.messages.in (254777 => 254778)
--- trunk/Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.messages.in 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.messages.in 2020-01-18 00:40:16 UTC (rev 254778)
@@ -1,31 +0,0 @@
-# Copyright (C) 2020 Apple Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-# THE POSSIBILITY OF SUCH DAMAGE.
-
-#if PLATFORM(COCOA) && ENABLE(GPU_PROCESS) && ENABLE(VIDEO_TRACK) && ENABLE(MEDIA_STREAM)
-
-messages -> RemoteSampleBufferDisplayLayerManager NotRefCounted {
- CreateLayer(WebKit::SampleBufferDisplayLayerIdentifier id, bool hideRootLayer, WebCore::IntSize size) -> (Optional<WebKit::LayerHostingContextID> contextID, CGRect bounds) Synchronous
- ReleaseLayer(WebKit::SampleBufferDisplayLayerIdentifier id)
-}
-
-#endif
Modified: trunk/Source/WebKit/Scripts/webkit/messages.py (254777 => 254778)
--- trunk/Source/WebKit/Scripts/webkit/messages.py 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebKit/Scripts/webkit/messages.py 2020-01-18 00:40:16 UTC (rev 254778)
@@ -225,7 +225,6 @@
'WebKit::RemoteMediaResourceIdentifier',
'WebKit::RTCDecoderIdentifier',
'WebKit::RTCEncoderIdentifier',
- 'WebKit::SampleBufferDisplayLayerIdentifier',
'WebKit::StorageAreaIdentifier',
'WebKit::StorageAreaImplIdentifier',
'WebKit::StorageNamespaceIdentifier',
Modified: trunk/Source/WebKit/Shared/WebCoreArgumentCoders.h (254777 => 254778)
--- trunk/Source/WebKit/Shared/WebCoreArgumentCoders.h 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebKit/Shared/WebCoreArgumentCoders.h 2020-01-18 00:40:16 UTC (rev 254778)
@@ -446,26 +446,6 @@
static void encode(Encoder&, const WebCore::KeypressCommand&);
static Optional<WebCore::KeypressCommand> decode(Decoder&);
};
-
-template<> struct ArgumentCoder<CGPoint> {
- static void encode(Encoder&, CGPoint);
- static Optional<CGPoint> decode(Decoder&);
-};
-
-template<> struct ArgumentCoder<CGSize> {
- static void encode(Encoder&, CGSize);
- static Optional<CGSize> decode(Decoder&);
-};
-
-template<> struct ArgumentCoder<CGRect> {
- static void encode(Encoder&, CGRect);
- static Optional<CGRect> decode(Decoder&);
-};
-
-template<> struct ArgumentCoder<CGAffineTransform> {
- static void encode(Encoder&, CGAffineTransform);
- static Optional<CGAffineTransform> decode(Decoder&);
-};
#endif
#if PLATFORM(IOS_FAMILY)
Modified: trunk/Source/WebKit/Shared/mac/WebCoreArgumentCodersMac.mm (254777 => 254778)
--- trunk/Source/WebKit/Shared/mac/WebCoreArgumentCodersMac.mm 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebKit/Shared/mac/WebCoreArgumentCodersMac.mm 2020-01-18 00:40:16 UTC (rev 254778)
@@ -548,79 +548,6 @@
return WTFMove(command);
}
-void ArgumentCoder<CGRect>::encode(Encoder& encoder, CGRect rect)
-{
- encoder << rect.origin << rect.size;
-}
-
-Optional<CGRect> ArgumentCoder<CGRect>::decode(Decoder& decoder)
-{
- Optional<CGPoint> origin;
- decoder >> origin;
- if (!origin)
- return { };
-
- Optional<CGSize> size;
- decoder >> size;
- if (!size)
- return { };
-
- return CGRect { *origin, *size };
-}
-
-void ArgumentCoder<CGSize>::encode(Encoder& encoder, CGSize size)
-{
- encoder << size.width << size.height;
-}
-
-Optional<CGSize> ArgumentCoder<CGSize>::decode(Decoder& decoder)
-{
- CGSize size;
- if (!decoder.decode(size.width))
- return { };
- if (!decoder.decode(size.height))
- return { };
- return size;
-}
-
-void ArgumentCoder<CGPoint>::encode(Encoder& encoder, CGPoint point)
-{
- encoder << point.x << point.y;
-}
-
-Optional<CGPoint> ArgumentCoder<CGPoint>::decode(Decoder& decoder)
-{
- CGPoint point;
- if (!decoder.decode(point.x))
- return { };
- if (!decoder.decode(point.y))
- return { };
- return point;
-}
-
-void ArgumentCoder<CGAffineTransform>::encode(Encoder& encoder, CGAffineTransform transform)
-{
- encoder << transform.a << transform.b << transform.c << transform.d << transform.tx << transform.ty;
-}
-
-Optional<CGAffineTransform> ArgumentCoder<CGAffineTransform>::decode(Decoder& decoder)
-{
- CGAffineTransform transform;
- if (!decoder.decode(transform.a))
- return { };
- if (!decoder.decode(transform.b))
- return { };
- if (!decoder.decode(transform.c))
- return { };
- if (!decoder.decode(transform.d))
- return { };
- if (!decoder.decode(transform.tx))
- return { };
- if (!decoder.decode(transform.ty))
- return { };
- return transform;
-}
-
#if ENABLE(CONTENT_FILTERING)
void ArgumentCoder<WebCore::ContentFilterUnblockHandler>::encode(Encoder& encoder, const WebCore::ContentFilterUnblockHandler& contentFilterUnblockHandler)
Modified: trunk/Source/WebKit/Sources.txt (254777 => 254778)
--- trunk/Source/WebKit/Sources.txt 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebKit/Sources.txt 2020-01-18 00:40:16 UTC (rev 254778)
@@ -28,8 +28,6 @@
GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererManager.cpp
GPUProcess/webrtc/RemoteMediaRecorder.cpp
GPUProcess/webrtc/RemoteMediaRecorderManager.cpp
-GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp
-GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp
GPUProcess/media/RemoteAudioTrackProxy.cpp
GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp
GPUProcess/media/RemoteMediaPlayerProxy.cpp
@@ -531,8 +529,6 @@
WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp
WebProcess/GPU/webrtc/MediaRecorderProvider.cpp
WebProcess/GPU/webrtc/AudioMediaStreamTrackRenderer.cpp
-WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp
-WebProcess/GPU/webrtc/SampleBufferDisplayLayerManager.cpp
WebProcess/Network/NetworkProcessConnection.cpp
WebProcess/Network/WebLoaderStrategy.cpp
Modified: trunk/Source/WebKit/SourcesCocoa.txt (254777 => 254778)
--- trunk/Source/WebKit/SourcesCocoa.txt 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebKit/SourcesCocoa.txt 2020-01-18 00:40:16 UTC (rev 254778)
@@ -644,8 +644,5 @@
RemoteAudioMediaStreamTrackRendererMessageReceiver.cpp
RemoteMediaRecorderMessageReceiver.cpp
RemoteMediaRecorderManagerMessageReceiver.cpp
-RemoteSampleBufferDisplayLayerManagerMessageReceiver.cpp
-RemoteSampleBufferDisplayLayerMessageReceiver.cpp
-SampleBufferDisplayLayerMessageReceiver.cpp
ServiceWorkerFetchTaskMessageReceiver.cpp
TextCheckingControllerProxyMessageReceiver.cpp
Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (254777 => 254778)
--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2020-01-18 00:40:16 UTC (rev 254778)
@@ -3296,8 +3296,6 @@
3F915C0E1F564DED00183CE9 /* WKFullScreenWindowControllerIOS.mm */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WKFullScreenWindowControllerIOS.mm; path = ios/fullscreen/WKFullScreenWindowControllerIOS.mm; sourceTree = "<group>"; };
3F915C0F1F564DED00183CE9 /* WKFullScreenWindowControllerIOS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WKFullScreenWindowControllerIOS.h; path = ios/fullscreen/WKFullScreenWindowControllerIOS.h; sourceTree = "<group>"; };
3FB08E421F60B240005E5312 /* iOS.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = iOS.xcassets; sourceTree = "<group>"; };
- 41024FC023CF104500FDF98E /* SampleBufferDisplayLayerManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SampleBufferDisplayLayerManager.h; sourceTree = "<group>"; };
- 41024FC123CF104500FDF98E /* SampleBufferDisplayLayerManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SampleBufferDisplayLayerManager.cpp; sourceTree = "<group>"; };
4103FBA12061BDB700C2EAF8 /* NetworkLoadChecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkLoadChecker.h; sourceTree = "<group>"; };
4103FBA22061BDB800C2EAF8 /* NetworkLoadChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkLoadChecker.cpp; sourceTree = "<group>"; };
410482CB1DDD2FB500F006D0 /* RTCNetwork.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RTCNetwork.cpp; sourceTree = "<group>"; };
@@ -3429,16 +3427,6 @@
41FCD6AD23CCC26000C62567 /* AudioMediaStreamTrackRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioMediaStreamTrackRenderer.h; sourceTree = "<group>"; };
41FCD6AE23CCC26100C62567 /* AudioMediaStreamTrackRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioMediaStreamTrackRenderer.cpp; sourceTree = "<group>"; };
41FCD6AF23CCC26100C62567 /* AudioMediaStreamTrackRendererIdentifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioMediaStreamTrackRendererIdentifier.h; sourceTree = "<group>"; };
- 41FCD6B323CDC60400C62567 /* SampleBufferDisplayLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SampleBufferDisplayLayer.h; sourceTree = "<group>"; };
- 41FCD6B423CDCAC200C62567 /* RemoteSampleBufferDisplayLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteSampleBufferDisplayLayer.h; sourceTree = "<group>"; };
- 41FCD6B523CDE1C600C62567 /* RemoteSampleBufferDisplayLayer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteSampleBufferDisplayLayer.cpp; sourceTree = "<group>"; };
- 41FCD6B623CDE1C600C62567 /* RemoteSampleBufferDisplayLayer.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = RemoteSampleBufferDisplayLayer.messages.in; sourceTree = "<group>"; };
- 41FCD6B723CDE53D00C62567 /* SampleBufferDisplayLayer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SampleBufferDisplayLayer.cpp; sourceTree = "<group>"; };
- 41FCD6B823CDE53E00C62567 /* SampleBufferDisplayLayer.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = SampleBufferDisplayLayer.messages.in; sourceTree = "<group>"; };
- 41FCD6BC23CE031800C62567 /* SampleBufferDisplayLayerIdentifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SampleBufferDisplayLayerIdentifier.h; sourceTree = "<group>"; };
- 41FCD6BD23CE043F00C62567 /* RemoteSampleBufferDisplayLayerManager.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RemoteSampleBufferDisplayLayerManager.messages.in; sourceTree = "<group>"; };
- 41FCD6BE23CE044000C62567 /* RemoteSampleBufferDisplayLayerManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteSampleBufferDisplayLayerManager.cpp; sourceTree = "<group>"; };
- 41FCD6BF23CE044000C62567 /* RemoteSampleBufferDisplayLayerManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteSampleBufferDisplayLayerManager.h; sourceTree = "<group>"; };
4450AEBF1DC3FAE5009943F2 /* SharedMemoryCocoa.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SharedMemoryCocoa.cpp; sourceTree = "<group>"; };
4459984122833E6000E61373 /* SyntheticEditingCommandType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SyntheticEditingCommandType.h; sourceTree = "<group>"; };
449D90D821FD63FE00F677C0 /* LocalAuthenticationSoftLink.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LocalAuthenticationSoftLink.mm; sourceTree = "<group>"; };
@@ -7246,12 +7234,6 @@
4176E89223C34D6E003E83FE /* MediaRecorderProvider.h */,
4172198C23B612E800AE5686 /* RTCDecoderIdentifier.h */,
4158649A23BE092400A0A61E /* RTCEncoderIdentifier.h */,
- 41FCD6B723CDE53D00C62567 /* SampleBufferDisplayLayer.cpp */,
- 41FCD6B323CDC60400C62567 /* SampleBufferDisplayLayer.h */,
- 41FCD6B823CDE53E00C62567 /* SampleBufferDisplayLayer.messages.in */,
- 41FCD6BC23CE031800C62567 /* SampleBufferDisplayLayerIdentifier.h */,
- 41024FC123CF104500FDF98E /* SampleBufferDisplayLayerManager.cpp */,
- 41024FC023CF104500FDF98E /* SampleBufferDisplayLayerManager.h */,
);
path = webrtc;
sourceTree = "<group>";
@@ -7274,12 +7256,6 @@
4176E89A23C36F71003E83FE /* RemoteMediaRecorderManager.cpp */,
4176E89923C36D8E003E83FE /* RemoteMediaRecorderManager.h */,
4176E89B23C37222003E83FE /* RemoteMediaRecorderManager.messages.in */,
- 41FCD6B523CDE1C600C62567 /* RemoteSampleBufferDisplayLayer.cpp */,
- 41FCD6B423CDCAC200C62567 /* RemoteSampleBufferDisplayLayer.h */,
- 41FCD6B623CDE1C600C62567 /* RemoteSampleBufferDisplayLayer.messages.in */,
- 41FCD6BE23CE044000C62567 /* RemoteSampleBufferDisplayLayerManager.cpp */,
- 41FCD6BF23CE044000C62567 /* RemoteSampleBufferDisplayLayerManager.h */,
- 41FCD6BD23CE043F00C62567 /* RemoteSampleBufferDisplayLayerManager.messages.in */,
);
path = webrtc;
sourceTree = "<group>";
@@ -12114,7 +12090,6 @@
41DE7C6C22278F1E00532B65 /* ServiceWorkerFetchTask.cpp in Sources */,
2D92A787212B6AB100F493FD /* ShareableBitmap.cpp in Sources */,
A1ADAFB62368E6A8009CB776 /* SharedMemory.cpp in Sources */,
- 575B1BB923CE9C0B0020639A /* SimulatedInputDispatcher.cpp in Sources */,
2DE6943D18BD2A68005C15E5 /* SmartMagnificationControllerMessageReceiver.cpp in Sources */,
1A334DED16DE8F88006A8E38 /* StorageAreaMapMessageReceiver.cpp in Sources */,
9368EEDE2303A90200BDB11A /* StorageManagerSetMessageReceiver.cpp in Sources */,
@@ -12264,6 +12239,7 @@
2D11B7D52126A283006F8878 /* UnifiedSource72.cpp in Sources */,
2D54C311212F3B330049C174 /* UnifiedSource72-mm.mm in Sources */,
2D54C310212F3B330049C174 /* UnifiedSource73-mm.mm in Sources */,
+ 575B1BBA23CE9C130020639A /* WebAutomationSession.cpp in Sources */,
2D11B7D62126A283006F8878 /* UnifiedSource73.cpp in Sources */,
2D54C315212F3B330049C174 /* UnifiedSource74-mm.mm in Sources */,
2D11B7D72126A283006F8878 /* UnifiedSource74.cpp in Sources */,
@@ -12310,9 +12286,7 @@
1A60224C18C16B9F00C3E8C9 /* VisitedLinkStoreMessageReceiver.cpp in Sources */,
1A8E7D3C18C15149005A702A /* VisitedLinkTableControllerMessageReceiver.cpp in Sources */,
57DCED702142EE680016B847 /* WebAuthenticatorCoordinatorProxyMessageReceiver.cpp in Sources */,
- 575B1BBA23CE9C130020639A /* WebAutomationSession.cpp in Sources */,
1C0A19571C90068F00FE0EBB /* WebAutomationSessionMessageReceiver.cpp in Sources */,
- 575B1BB823CE9BFC0020639A /* WebAutomationSessionProxy.cpp in Sources */,
1C0A19531C8FFDFB00FE0EBB /* WebAutomationSessionProxyMessageReceiver.cpp in Sources */,
1A1FEC1C1627B45700700F6D /* WebConnectionMessageReceiver.cpp in Sources */,
330934471315B9220097A7BC /* WebCookieManagerMessageReceiver.cpp in Sources */,
@@ -12328,6 +12302,7 @@
BC0E606112D6BA910012A72A /* WebGeolocationManagerMessageReceiver.cpp in Sources */,
BC0E618212D6CB1D0012A72A /* WebGeolocationManagerProxyMessageReceiver.cpp in Sources */,
510523751C73D38F007993CB /* WebIDBConnectionToServerMessageReceiver.cpp in Sources */,
+ 575B1BB923CE9C0B0020639A /* SimulatedInputDispatcher.cpp in Sources */,
933E835B23A1B75000DEF289 /* WebIDBServerMessageReceiver.cpp in Sources */,
FEDBDCD61E68D20000A59F8F /* WebInspectorInterruptDispatcherMessageReceiver.cpp in Sources */,
1C8E2A351277852400BC7BD0 /* WebInspectorMessageReceiver.cpp in Sources */,
@@ -12383,6 +12358,7 @@
637281A321ADC744009E0DE6 /* WKDownloadProgress.mm in Sources */,
5CE9120D2293C219005BEC78 /* WKMain.mm in Sources */,
4657D88A22664A2F005DE823 /* WKOrientationAccessAlert.mm in Sources */,
+ 575B1BB823CE9BFC0020639A /* WebAutomationSessionProxy.cpp in Sources */,
5CA26D83217AD1B800F97A35 /* WKSafeBrowsingWarning.mm in Sources */,
1DB01944211CF005009FB3E8 /* WKShareSheet.mm in Sources */,
7A78FF332241919B0096483E /* WKStorageAccessAlert.mm in Sources */,
Modified: trunk/Source/WebKit/WebProcess/GPU/GPUProcessConnection.cpp (254777 => 254778)
--- trunk/Source/WebKit/WebProcess/GPU/GPUProcessConnection.cpp 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebKit/WebProcess/GPU/GPUProcessConnection.cpp 2020-01-18 00:40:16 UTC (rev 254778)
@@ -34,7 +34,6 @@
#include "LibWebRTCCodecsMessages.h"
#include "RemoteMediaPlayerManager.h"
#include "RemoteMediaPlayerManagerMessages.h"
-#include "SampleBufferDisplayLayerMessages.h"
#include "UserMediaCaptureManager.h"
#include "UserMediaCaptureManagerMessages.h"
#include "WebCoreArgumentCoders.h"
@@ -65,15 +64,6 @@
{
}
-#if PLATFORM(COCOA) && ENABLE(VIDEO_TRACK) && ENABLE(MEDIA_STREAM)
-SampleBufferDisplayLayerManager& GPUProcessConnection::sampleBufferDisplayLayerManager()
-{
- if (!m_sampleBufferDisplayLayerManager)
- m_sampleBufferDisplayLayerManager = makeUnique<SampleBufferDisplayLayerManager>();
- return *m_sampleBufferDisplayLayerManager;
-}
-#endif
-
void GPUProcessConnection::didReceiveMessage(IPC::Connection& connection, IPC::Decoder& decoder)
{
if (decoder.messageReceiverName() == Messages::RemoteMediaPlayerManager::messageReceiverName()) {
@@ -86,13 +76,7 @@
captureManager->didReceiveMessageFromGPUProcess(connection, decoder);
return;
}
-#if PLATFORM(COCOA) && ENABLE(VIDEO_TRACK)
- if (decoder.messageReceiverName() == Messages::SampleBufferDisplayLayer::messageReceiverName()) {
- sampleBufferDisplayLayerManager().didReceiveLayerMessage(connection, decoder);
- return;
- }
-#endif // PLATFORM(COCOA) && ENABLE(VIDEO_TRACK)
-#endif // ENABLE(MEDIA_STREAM)
+#endif
#if USE(LIBWEBRTC) && PLATFORM(COCOA)
if (decoder.messageReceiverName() == Messages::LibWebRTCCodecs::messageReceiverName()) {
WebProcess::singleton().libWebRTCCodecs().didReceiveMessage(connection, decoder);
Modified: trunk/Source/WebKit/WebProcess/GPU/GPUProcessConnection.h (254777 => 254778)
--- trunk/Source/WebKit/WebProcess/GPU/GPUProcessConnection.h 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebKit/WebProcess/GPU/GPUProcessConnection.h 2020-01-18 00:40:16 UTC (rev 254778)
@@ -28,7 +28,6 @@
#if ENABLE(GPU_PROCESS)
#include "Connection.h"
-#include "SampleBufferDisplayLayerManager.h"
#include <wtf/RefCounted.h>
#include <wtf/text/WTFString.h>
@@ -52,9 +51,6 @@
void setAuditToken(Optional<audit_token_t> auditToken) { m_auditToken = auditToken; }
Optional<audit_token_t> auditToken() const { return m_auditToken; }
#endif
-#if PLATFORM(COCOA) && ENABLE(VIDEO_TRACK) && ENABLE(MEDIA_STREAM)
- SampleBufferDisplayLayerManager& sampleBufferDisplayLayerManager();
-#endif
private:
GPUProcessConnection(IPC::Connection::Identifier);
@@ -70,9 +66,6 @@
#if HAVE(AUDIT_TOKEN)
Optional<audit_token_t> m_auditToken;
#endif
-#if PLATFORM(COCOA) && ENABLE(VIDEO_TRACK) && ENABLE(MEDIA_STREAM)
- std::unique_ptr<SampleBufferDisplayLayerManager> m_sampleBufferDisplayLayerManager;
-#endif
};
} // namespace WebKit
Modified: trunk/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp (254777 => 254778)
--- trunk/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp 2020-01-18 00:40:16 UTC (rev 254778)
@@ -370,12 +370,8 @@
RemoteMediaPlayerSupport::setRegisterRemotePlayerCallback(settings.useGPUProcessForMedia() ? WTFMove(registerEngine) : RemoteMediaPlayerSupport::RegisterRemotePlayerCallback());
#if PLATFORM(COCOA) && ENABLE(VIDEO_TRACK) && ENABLE(MEDIA_STREAM)
- if (settings.useGPUProcessForMedia()) {
+ if (settings.useGPUProcessForMedia())
WebCore::AudioMediaStreamTrackRenderer::setCreator(WebKit::AudioMediaStreamTrackRenderer::create);
- WebCore::SampleBufferDisplayLayer::setCreator([](auto& client, bool hideRootLayer, auto size) {
- return WebProcess::singleton().ensureGPUProcessConnection().sampleBufferDisplayLayerManager().createLayer(client, hideRootLayer, size);
- });
- }
#endif
}
Deleted: trunk/Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp (254777 => 254778)
--- trunk/Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp 2020-01-18 00:40:16 UTC (rev 254778)
@@ -1,132 +0,0 @@
-/*
- * Copyright (C) 2020 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "SampleBufferDisplayLayer.h"
-
-#if PLATFORM(COCOA) && ENABLE(GPU_PROCESS) && ENABLE(VIDEO_TRACK) && ENABLE(MEDIA_STREAM)
-
-#include "LayerHostingContext.h"
-#include "RemoteSampleBufferDisplayLayerManagerMessages.h"
-#include "RemoteSampleBufferDisplayLayerManagerMessagesReplies.h"
-#include "RemoteSampleBufferDisplayLayerMessages.h"
-#include "SampleBufferDisplayLayerManager.h"
-#include "WebCoreArgumentCoders.h"
-
-using namespace WebCore;
-
-namespace WebKit {
-
-std::unique_ptr<SampleBufferDisplayLayer> SampleBufferDisplayLayer::create(SampleBufferDisplayLayerManager& manager, Client& client, bool hideRootLayer, IntSize size)
-{
- auto layer = std::unique_ptr<SampleBufferDisplayLayer>(new SampleBufferDisplayLayer(manager, client, hideRootLayer, size));
- return layer->rootLayer() ? WTFMove(layer) : nullptr;
-}
-
-SampleBufferDisplayLayer::SampleBufferDisplayLayer(SampleBufferDisplayLayerManager& manager, Client& client, bool hideRootLayer, IntSize size)
- : WebCore::SampleBufferDisplayLayer(client)
- , m_manager(makeWeakPtr(manager))
- , m_connection(WebProcess::singleton().ensureGPUProcessConnection().connection())
- , m_identifier(SampleBufferDisplayLayerIdentifier::generate())
-{
- manager.addLayer(*this);
-
- Optional<LayerHostingContextID> contextId;
- if (!m_connection->sendSync(Messages::RemoteSampleBufferDisplayLayerManager::CreateLayer { m_identifier, hideRootLayer, size }, Messages::RemoteSampleBufferDisplayLayerManager::CreateLayer::Reply { contextId, m_bounds }, 0))
- return;
-
- if (!contextId)
- return;
-
- m_videoLayer = LayerHostingContext::createPlatformLayerForHostingContext(*contextId);
-}
-
-SampleBufferDisplayLayer::~SampleBufferDisplayLayer()
-{
- m_connection->send(Messages::RemoteSampleBufferDisplayLayerManager::ReleaseLayer { m_identifier }, 0);
- if (m_manager)
- m_manager->removeLayer(*this);
-}
-
-bool SampleBufferDisplayLayer::didFail() const
-{
- return m_didFail;
-}
-
-void SampleBufferDisplayLayer::updateDisplayMode(bool hideDisplayLayer, bool hideRootLayer)
-{
- m_connection->send(Messages::RemoteSampleBufferDisplayLayer::UpdateDisplayMode { hideDisplayLayer, hideRootLayer }, m_identifier);
-}
-
-CGRect SampleBufferDisplayLayer::bounds() const
-{
- return m_bounds;
-}
-
-void SampleBufferDisplayLayer::updateAffineTransform(CGAffineTransform transform)
-{
- m_connection->send(Messages::RemoteSampleBufferDisplayLayer::UpdateAffineTransform { transform }, m_identifier);
-}
-
-void SampleBufferDisplayLayer::updateBoundsAndPosition(CGRect bounds, CGPoint position)
-{
- m_bounds = bounds;
- m_connection->send(Messages::RemoteSampleBufferDisplayLayer::UpdateBoundsAndPosition { bounds, position }, m_identifier);
-}
-
-void SampleBufferDisplayLayer::flush()
-{
- m_connection->send(Messages::RemoteSampleBufferDisplayLayer::Flush { }, m_identifier);
-}
-
-void SampleBufferDisplayLayer::flushAndRemoveImage()
-{
- m_connection->send(Messages::RemoteSampleBufferDisplayLayer::FlushAndRemoveImage { }, m_identifier);
-}
-
-void SampleBufferDisplayLayer::enqueueSample(MediaSample& sample)
-{
- if (auto remoteSample = RemoteVideoSample::create(sample))
- m_connection->send(Messages::RemoteSampleBufferDisplayLayer::EnqueueSample { *remoteSample }, m_identifier);
-}
-
-void SampleBufferDisplayLayer::clearEnqueuedSamples()
-{
- m_connection->send(Messages::RemoteSampleBufferDisplayLayer::ClearEnqueuedSamples { }, m_identifier);
-}
-
-PlatformLayer* SampleBufferDisplayLayer::rootLayer()
-{
- return m_videoLayer.get();
-}
-
-void SampleBufferDisplayLayer::setDidFail(bool value)
-{
- m_didFail = value;
-}
-
-}
-
-#endif
Deleted: trunk/Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h (254777 => 254778)
--- trunk/Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h 2020-01-18 00:40:16 UTC (rev 254778)
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2020 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#if PLATFORM(COCOA) && ENABLE(GPU_PROCESS) && ENABLE(VIDEO_TRACK) && ENABLE(MEDIA_STREAM)
-
-#include "MessageReceiver.h"
-#include "SampleBufferDisplayLayerIdentifier.h"
-#include <WebCore/SampleBufferDisplayLayer.h>
-#include <wtf/WeakPtr.h>
-
-namespace WebKit {
-
-class SampleBufferDisplayLayerManager;
-
-class SampleBufferDisplayLayer final : public WebCore::SampleBufferDisplayLayer, public IPC::MessageReceiver, public CanMakeWeakPtr<SampleBufferDisplayLayer> {
-public:
- static std::unique_ptr<SampleBufferDisplayLayer> create(SampleBufferDisplayLayerManager&, Client&, bool hideRootLayer, WebCore::IntSize);
- ~SampleBufferDisplayLayer();
-
- SampleBufferDisplayLayerIdentifier identifier() const { return m_identifier; }
-
- void didReceiveMessage(IPC::Connection&, IPC::Decoder&) final;
-
-private:
- SampleBufferDisplayLayer(SampleBufferDisplayLayerManager&, Client&, bool hideRootLayer, WebCore::IntSize);
-
- // WebCore::SampleBufferDisplayLayer
- bool didFail() const final;
- void updateDisplayMode(bool hideDisplayLayer, bool hideRootLayer) final;
- CGRect bounds() const final;
- void updateAffineTransform(CGAffineTransform) final;
- void updateBoundsAndPosition(CGRect, CGPoint) final;
- void flush() final;
- void flushAndRemoveImage() final;
- void enqueueSample(WebCore::MediaSample&) final;
- void clearEnqueuedSamples() final;
- PlatformLayer* rootLayer() final;
-
- void setDidFail(bool);
-
- WeakPtr<SampleBufferDisplayLayerManager> m_manager;
- Ref<IPC::Connection> m_connection;
- SampleBufferDisplayLayerIdentifier m_identifier;
-
- RetainPtr<PlatformLayer> m_videoLayer;
- CGRect m_bounds;
- bool m_didFail { false };
-};
-
-}
-
-#endif // PLATFORM(COCOA) && ENABLE(GPU_PROCESS) && ENABLE(VIDEO_TRACK) && ENABLE(MEDIA_STREAM)
Deleted: trunk/Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayer.messages.in (254777 => 254778)
--- trunk/Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayer.messages.in 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayer.messages.in 2020-01-18 00:40:16 UTC (rev 254778)
@@ -1,30 +0,0 @@
-# Copyright (C) 2020 Apple Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-# THE POSSIBILITY OF SUCH DAMAGE.
-
-#if PLATFORM(COCOA) && ENABLE(GPU_PROCESS) && ENABLE(VIDEO_TRACK) && ENABLE(MEDIA_STREAM)
-
-messages -> SampleBufferDisplayLayer NotRefCounted {
- SetDidFail(bool value)
-}
-
-#endif
Deleted: trunk/Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayerIdentifier.h (254777 => 254778)
--- trunk/Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayerIdentifier.h 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayerIdentifier.h 2020-01-18 00:40:16 UTC (rev 254778)
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2020 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice , this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#if ENABLE(GPU_PROCESS)
-
-#include <wtf/ObjectIdentifier.h>
-
-namespace WebKit {
-
-enum SampleBufferDisplayLayerIdentifierType { };
-using SampleBufferDisplayLayerIdentifier = ObjectIdentifier<SampleBufferDisplayLayerIdentifierType>;
-
-} // namespace WebKit
-
-#endif
Deleted: trunk/Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayerManager.cpp (254777 => 254778)
--- trunk/Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayerManager.cpp 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayerManager.cpp 2020-01-18 00:40:16 UTC (rev 254778)
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2020 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "SampleBufferDisplayLayerManager.h"
-
-#if PLATFORM(COCOA) && ENABLE(GPU_PROCESS) && ENABLE(VIDEO_TRACK) && ENABLE(MEDIA_STREAM)
-
-using namespace WebCore;
-
-namespace WebKit {
-
-void SampleBufferDisplayLayerManager::didReceiveLayerMessage(IPC::Connection& connection, IPC::Decoder& decoder)
-{
- if (auto* layer = m_layers.get(makeObjectIdentifier<SampleBufferDisplayLayerIdentifierType>(decoder.destinationID())).get())
- layer->didReceiveMessage(connection, decoder);
-}
-
-std::unique_ptr<WebCore::SampleBufferDisplayLayer> SampleBufferDisplayLayerManager::createLayer(SampleBufferDisplayLayer::Client& client, bool hideRootLayer, WebCore::IntSize size)
-{
- auto layer = SampleBufferDisplayLayer::create(*this, client, hideRootLayer, size);
- if (!layer)
- return { };
-
- m_layers.add(layer->identifier(), makeWeakPtr(*layer));
- return layer;
-}
-
-void SampleBufferDisplayLayerManager::addLayer(SampleBufferDisplayLayer& layer)
-{
- ASSERT(!m_layers.contains(layer.identifier()));
- m_layers.add(layer.identifier(), makeWeakPtr(layer));
-}
-
-void SampleBufferDisplayLayerManager::removeLayer(SampleBufferDisplayLayer& layer)
-{
- ASSERT(m_layers.contains(layer.identifier()));
- m_layers.remove(layer.identifier());
-}
-
-}
-
-#endif
Deleted: trunk/Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayerManager.h (254777 => 254778)
--- trunk/Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayerManager.h 2020-01-18 00:32:48 UTC (rev 254777)
+++ trunk/Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayerManager.h 2020-01-18 00:40:16 UTC (rev 254778)
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2020 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#if PLATFORM(COCOA) && ENABLE(GPU_PROCESS) && ENABLE(VIDEO_TRACK) && ENABLE(MEDIA_STREAM)
-
-#include "SampleBufferDisplayLayer.h"
-#include <wtf/HashMap.h>
-
-namespace WebKit {
-
-class SampleBufferDisplayLayerManager : public CanMakeWeakPtr<SampleBufferDisplayLayerManager> {
- WTF_MAKE_FAST_ALLOCATED;
-public:
- SampleBufferDisplayLayerManager() = default;
- ~SampleBufferDisplayLayerManager() = default;
-
- void addLayer(SampleBufferDisplayLayer&);
- void removeLayer(SampleBufferDisplayLayer&);
-
- void didReceiveLayerMessage(IPC::Connection&, IPC::Decoder&);
- std::unique_ptr<WebCore::SampleBufferDisplayLayer> createLayer(SampleBufferDisplayLayer::Client&, bool hideRootLayer, WebCore::IntSize);
-
-private:
- HashMap<SampleBufferDisplayLayerIdentifier, WeakPtr<SampleBufferDisplayLayer>> m_layers;
-};
-
-}
-
-#endif // PLATFORM(COCOA) && ENABLE(GPU_PROCESS) && ENABLE(VIDEO_TRACK) && ENABLE(MEDIA_STREAM)