Skip to content

Commit

Permalink
Revert "Cherry-pick fe4af8b. rdar://problem/109380900"
Browse files Browse the repository at this point in the history
This reverts commit 835f877.

Identifier: 263769.54@safari-7616.1.14.10-branch
  • Loading branch information
Dan Robson committed May 24, 2023
1 parent 042a2b7 commit 5c1e0cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
6 changes: 1 addition & 5 deletions Source/WebKit/GPUProcess/GPUProcess.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2023 Apple Inc. All rights reserved.
* Copyright (C) 2019-2022 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -39,7 +39,6 @@
#include "GPUProcessProxyMessages.h"
#include "GPUProcessSessionParameters.h"
#include "LogInitialization.h"
#include "Logging.h"
#include "RemoteMediaPlayerManagerProxy.h"
#include "SandboxExtension.h"
#include "WebPageProxyMessages.h"
Expand Down Expand Up @@ -382,7 +381,6 @@ GPUConnectionToWebProcess* GPUProcess::webProcessConnection(WebCore::ProcessIden

void GPUProcess::updateSandboxAccess(const Vector<SandboxExtension::Handle>& extensions)
{
RELEASE_LOG(WebRTC, "GPUProcess::updateSandboxAccess: Adding %ld extensions", extensions.size());
for (auto& extension : extensions)
SandboxExtension::consumePermanently(extension);
}
Expand Down Expand Up @@ -411,8 +409,6 @@ void GPUProcess::setOrientationForMediaCapture(IntDegrees orientation)

void GPUProcess::updateCaptureAccess(bool allowAudioCapture, bool allowVideoCapture, bool allowDisplayCapture, WebCore::ProcessIdentifier processID, CompletionHandler<void()>&& completionHandler)
{
RELEASE_LOG(WebRTC, "GPUProcess::updateCaptureAccess: Entering (audio=%d, video=%d, display=%d)", allowAudioCapture, allowVideoCapture, allowDisplayCapture);

#if ENABLE(MEDIA_STREAM) && PLATFORM(COCOA)
ensureAVCaptureServerConnection();
#endif
Expand Down
13 changes: 6 additions & 7 deletions Source/WebKit/GPUProcess/cocoa/GPUProcessCocoa.mm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2023 Apple Inc. All rights reserved.
* Copyright (C) 2021-2022 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -31,7 +31,6 @@
#if ENABLE(GPU_PROCESS) && PLATFORM(COCOA)

#import "GPUConnectionToWebProcess.h"
#import "Logging.h"
#import "RemoteRenderingBackend.h"
#import <pal/spi/cocoa/AVFoundationSPI.h>
#import <wtf/RetainPtr.h>
Expand Down Expand Up @@ -81,11 +80,11 @@
#if ENABLE(MEDIA_STREAM)
void GPUProcess::ensureAVCaptureServerConnection()
{
RELEASE_LOG(WebRTC, "GPUProcess::ensureAVCaptureServerConnection: Entering.");
if ([PAL::getAVCaptureDeviceClass() respondsToSelector:@selector(ensureServerConnection)]) {
RELEASE_LOG(WebRTC, "GPUProcess::ensureAVCaptureServerConnection: Calling [AVCaptureDevice ensureServerConnection]");
[PAL::getAVCaptureDeviceClass() ensureServerConnection];
}
static std::once_flag flag;
std::call_once(flag, [] {
if ([PAL::getAVCaptureDeviceClass() respondsToSelector:@selector(ensureServerConnection)])
[PAL::getAVCaptureDeviceClass() ensureServerConnection];
});
}
#endif

Expand Down

0 comments on commit 5c1e0cc

Please sign in to comment.