Rename media in the GPU process preference
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Dec 2019 02:10:00 +0000 (02:10 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Dec 2019 02:10:00 +0000 (02:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=205013
<rdar://problem/57755319>

Reviewed by Tim Horton.

Source/WebCore:

* page/Settings.yaml:

Source/WebKit:

* Shared/WebPreferences.yaml:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

Source/WebKitLegacy/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences useGPUProcessForMedia]):
(-[WebPreferences setUseGPUProcessForMedia:]):
(-[WebPreferences outOfProcessMediaEnabled]): Deleted.
(-[WebPreferences setOutOfProcessMediaEnabled:]): Deleted.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253316 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/page/Settings.yaml
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebPreferences.yaml
Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h
Source/WebKitLegacy/mac/WebView/WebPreferences.mm
Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h
Source/WebKitLegacy/mac/WebView/WebView.mm

index a639e32..7dcbfb2 100644 (file)
@@ -1,3 +1,13 @@
+2019-12-09  Eric Carlson  <eric.carlson@apple.com>
+
+        Rename media in the GPU process preference
+        https://bugs.webkit.org/show_bug.cgi?id=205013
+        <rdar://problem/57755319>
+
+        Reviewed by Tim Horton.
+
+        * page/Settings.yaml:
+
 2019-12-09  Fujii Hironori  <Hironori.Fujii@sony.com>
 
         [WinCairo] Add support of Unicode surrogate pair for simple texts
index 0ea6a04..b329f12 100644 (file)
@@ -322,11 +322,11 @@ shouldDisplayTextDescriptions:
   initial: false
   conditional: VIDEO_TRACK
 genericCueAPIEnabled:
-    initial: false
-    conditional: VIDEO_TRACK
-outOfProcessMediaEnabled:
-    initial: false
-    conditional: VIDEO
+  initial: false
+  conditional: VIDEO_TRACK
+useGPUProcessForMedia:
+  initial: false
+  conditional: GPU_PROCESS
 scrollingCoordinatorEnabled:
   initial: false
 scrollingTreeIncludesFrames:
index f7a6a9f..f7d0ab4 100644 (file)
@@ -1,3 +1,15 @@
+2019-12-09  Eric Carlson  <eric.carlson@apple.com>
+
+        Rename media in the GPU process preference
+        https://bugs.webkit.org/show_bug.cgi?id=205013
+        <rdar://problem/57755319>
+
+        Reviewed by Tim Horton.
+
+        * Shared/WebPreferences.yaml:
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
+
 2019-12-09  Truitt Savell  <tsavell@apple.com>
 
         Unreviewed, rolling out r253299.
index 0e29ac6..2e7b4b4 100644 (file)
@@ -1875,14 +1875,14 @@ RemotePlaybackEnabled:
   humanReadableName: "Remote Playback API"
   humanReadableDescription: "Enable Remote Playback API"
 
-OutOfProcessMediaEnabled:
+UseGPUProcessForMedia:
     type: bool
     defaultValue: false
-    condition: ENABLE(VIDEO)
+    condition: ENABLE(GPU_PROCESS)
     humanReadableName: "Media in GPU process"
     humanReadableDescription: "Do all media loading and playback in the GPU process"
-    category: experimental
-    webcoreName: outOfProcessMediaEnabled
+    category: internal
+    webcoreName: useGPUProcessForMedia
 
 # Deprecated
 
index 70417c9..5615b99 100644 (file)
@@ -227,12 +227,6 @@ void InjectedBundle::overrideBoolPreferenceForTestRunner(WebPageGroupProxy* page
 #endif
 
 #if ENABLE(MEDIA_STREAM)
-    if (preference == "WebKitCaptureAudioInGPUProcessEnabledKey") {
-        WebPreferencesStore::overrideBoolValueForKey(WebPreferencesKey::imageControlsEnabledKey(), enabled);
-        for (auto* page : pages)
-            page->settings().setOutOfProcessMediaEnabled(enabled);
-        return;
-    }
     if (preference == "WebKitMediaDevicesEnabled")
         RuntimeEnabledFeatures::sharedFeatures().setMediaDevicesEnabled(enabled);
     if (preference == "WebKitScreenCaptureEnabled")
@@ -246,18 +240,18 @@ void InjectedBundle::overrideBoolPreferenceForTestRunner(WebPageGroupProxy* page
 
 #if ENABLE(VIDEO_TRACK)
     if (preference == "WebKitGenericCueAPIEnabled") {
-        WebPreferencesStore::overrideBoolValueForKey(WebPreferencesKey::imageControlsEnabledKey(), enabled);
+        WebPreferencesStore::overrideBoolValueForKey(WebPreferencesKey::genericCueAPIEnabledKey(), enabled);
         for (auto* page : pages)
             page->settings().setGenericCueAPIEnabled(enabled);
         return;
     }
 #endif
 
-#if ENABLE(VIDEO)
-    if (preference == "WebKitOutOfProcessMediaEnabled") {
-        WebPreferencesStore::overrideBoolValueForKey(WebPreferencesKey::imageControlsEnabledKey(), enabled);
+#if ENABLE(GPU_PROCESS)
+    if (preference == "WebKitUseGPUProcessForMedia" || preference == "WebKitCaptureAudioInGPUProcessEnabledKey") {
+        WebPreferencesStore::overrideBoolValueForKey(WebPreferencesKey::useGPUProcessForMediaKey(), enabled);
         for (auto* page : pages)
-            page->settings().setOutOfProcessMediaEnabled(enabled);
+            page->settings().setUseGPUProcessForMedia(enabled);
         return;
     }
 #endif
index d262d89..b9dae2c 100644 (file)
@@ -1,3 +1,22 @@
+2019-12-09  Eric Carlson  <eric.carlson@apple.com>
+
+        Rename media in the GPU process preference
+        https://bugs.webkit.org/show_bug.cgi?id=205013
+        <rdar://problem/57755319>
+
+        Reviewed by Tim Horton.
+
+        * WebView/WebPreferenceKeysPrivate.h:
+        * WebView/WebPreferences.mm:
+        (+[WebPreferences initialize]):
+        (-[WebPreferences useGPUProcessForMedia]):
+        (-[WebPreferences setUseGPUProcessForMedia:]):
+        (-[WebPreferences outOfProcessMediaEnabled]): Deleted.
+        (-[WebPreferences setOutOfProcessMediaEnabled:]): Deleted.
+        * WebView/WebPreferencesPrivate.h:
+        * WebView/WebView.mm:
+        (-[WebView _preferencesChanged:]):
+
 2019-12-09  Alex Christensen  <achristensen@webkit.org>
 
         Re-disable TLS1.0 and TLS1.1 by default
index a3020da..441b5a8 100644 (file)
 #define WebKitEncryptedMediaAPIEnabledKey @"WebKitEncryptedMediaAPIEnabled"
 #define WebKitPictureInPictureAPIEnabledKey @"WebKitPictureInPictureAPIEnabled"
 #define WebKitGenericCueAPIEnabledKey @"WebKitGenericCueAPIEnabled"
-#define WebKitOutOfProcessMediaEnabledKey @"WebKitOutOfProcessMediaEnabled"
+#define WebKitUseGPUProcessForMediaKey @"WebKitUseGPUProcessForMedia"
 #define WebKitAllowMediaContentTypesRequiringHardwareSupportAsFallbackKey @"WebKitAllowMediaContentTypesRequiringHardwareSupportAsFallback"
 #define WebKitInspectorAdditionsEnabledPreferenceKey @"WebKitInspectorAdditionsEnabled"
 #define WebKitAccessibilityObjectModelEnabledPreferenceKey @"WebKitAccessibilityObjectModelEnabled"
index b2c840b..47f7c75 100644 (file)
@@ -617,8 +617,8 @@ public:
         @NO, WebKitGenericCueAPIEnabledKey,
 #endif
 
-#if ENABLE(VIDEO)
-        @NO, WebKitOutOfProcessMediaEnabledKey,
+#if ENABLE(GPU_PROCESS)
+        @NO, WebKitUseGPUProcessForMediaKey,
 #endif
 
 #if ENABLE(MEDIA_STREAM)
@@ -3383,14 +3383,14 @@ static NSString *classIBCreatorID = nil;
     [self _setBoolValue:flag forKey:WebKitGenericCueAPIEnabledKey];
 }
 
-- (BOOL)outOfProcessMediaEnabled
+- (BOOL)useGPUProcessForMedia
 {
-    return [self _boolValueForKey:WebKitOutOfProcessMediaEnabledKey];
+    return [self _boolValueForKey:WebKitUseGPUProcessForMediaKey];
 }
 
-- (void)setOutOfProcessMediaEnabled:(BOOL)flag
+- (void)setUseGPUProcessForMedia:(BOOL)flag
 {
-    [self _setBoolValue:flag forKey:WebKitOutOfProcessMediaEnabledKey];
+    [self _setBoolValue:flag forKey:WebKitUseGPUProcessForMediaKey];
 }
 
 - (BOOL)viewportFitEnabled
index 29d70ed..59758e2 100644 (file)
@@ -652,7 +652,7 @@ extern NSString *WebPreferencesCacheModelChangedInternalNotification WEBKIT_DEPR
 @property (nonatomic) BOOL encryptedMediaAPIEnabled;
 @property (nonatomic) BOOL pictureInPictureAPIEnabled;
 @property (nonatomic) BOOL genericCueAPIEnabled;
-@property (nonatomic) BOOL outOfProcessMediaEnabled;
+@property (nonatomic) BOOL useGPUProcessForMedia;
 @property (nonatomic) BOOL viewportFitEnabled;
 @property (nonatomic) BOOL constantPropertiesEnabled;
 @property (nonatomic) BOOL colorFilterEnabled;
index dd16461..47aae32 100644 (file)
@@ -3211,8 +3211,8 @@ static bool needsSelfRetainWhileLoadingQuirk()
     settings.setGenericCueAPIEnabled(preferences.genericCueAPIEnabled);
 #endif
 
-#if ENABLE(VIDEO)
-    settings.setOutOfProcessMediaEnabled(preferences.outOfProcessMediaEnabled);
+#if ENABLE(GPU_PROCESS)
+    settings.setUseGPUProcessForMedia(preferences.useGPUProcessForMedia);
 #endif
 
     RuntimeEnabledFeatures::sharedFeatures().setInspectorAdditionsEnabled(preferences.inspectorAdditionsEnabled);