Title: [248838] branches/safari-608-branch/Source/WebCore
Revision
248838
Author
bshaf...@apple.com
Date
2019-08-18 23:03:27 -0700 (Sun, 18 Aug 2019)

Log Message

Cherry-pick r248747. rdar://problem/54365278

    [Cocoa] Adopt -preventDisplaySleepForVideoPlayback
    https://bugs.webkit.org/show_bug.cgi?id=200774

    Reviewed by Eric Carlson.

    * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
    (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):

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

Modified Paths

Diff

Modified: branches/safari-608-branch/Source/WebCore/ChangeLog (248837 => 248838)


--- branches/safari-608-branch/Source/WebCore/ChangeLog	2019-08-19 06:03:24 UTC (rev 248837)
+++ branches/safari-608-branch/Source/WebCore/ChangeLog	2019-08-19 06:03:27 UTC (rev 248838)
@@ -1,5 +1,30 @@
 2019-08-18  Babak Shafiei  <bshaf...@apple.com>
 
+        Cherry-pick r248747. rdar://problem/54365278
+
+    [Cocoa] Adopt -preventDisplaySleepForVideoPlayback
+    https://bugs.webkit.org/show_bug.cgi?id=200774
+    
+    Reviewed by Eric Carlson.
+    
+    * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
+    (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248747 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-08-15  Jer Noble  <jer.no...@apple.com>
+
+            [Cocoa] Adopt -preventDisplaySleepForVideoPlayback
+            https://bugs.webkit.org/show_bug.cgi?id=200774
+
+            Reviewed by Eric Carlson.
+
+            * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
+            (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
+
+2019-08-18  Babak Shafiei  <bshaf...@apple.com>
+
         Cherry-pick r248028. rdar://problem/54454990
 
     ASSERTion failure under takeSnapshot after r247846

Modified: branches/safari-608-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm (248837 => 248838)


--- branches/safari-608-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm	2019-08-19 06:03:24 UTC (rev 248837)
+++ branches/safari-608-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm	2019-08-19 06:03:27 UTC (rev 248838)
@@ -65,6 +65,10 @@
 - (instancetype)initWithStorageDirectoryAtURL:(NSURL *)storageDirectory;
 @end
 
+@interface AVSampleBufferDisplayLayer (WebCorePrivate)
+@property (assign, nonatomic) BOOL preventDisplaySleepForVideoPlayback;
+@end
+
 namespace WebCore {
 using namespace PAL;
 
@@ -758,6 +762,9 @@
         return;
     }
 
+    if ([m_sampleBufferDisplayLayer respondsToSelector:@selector(setPreventDisplaySleepForVideoPlayback:)])
+        m_sampleBufferDisplayLayer.get().preventDisplaySleepForVideoPlayback = NO;
+
     [m_synchronizer addRenderer:m_sampleBufferDisplayLayer.get()];
     if (m_mediaSourcePrivate)
         m_mediaSourcePrivate->setVideoLayer(m_sampleBufferDisplayLayer.get());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to