Changeset 154775 in webkit
- Timestamp:
- Aug 28, 2013 1:26:22 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r154769 r154775 1 2013-08-28 Eric Carlson <eric.carlson@apple.com> 2 3 MediaPlayerPrivateAVFoundationObjC is painting video frames under the video layer 4 https://bugs.webkit.org/show_bug.cgi?id=120170 5 6 Reviewed by Simon Fraser. 7 8 No new tests, it is only possible to test in the debugger. 9 10 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: 11 (WebCore::MediaPlayerPrivateAVFoundationObjC::hasAvailableVideoFrame): Drive by optimization. 12 (WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext): Move logic from paint here. 13 (WebCore::MediaPlayerPrivateAVFoundationObjC::paint): Do nothing if we already have a video layer, 14 otherwise call paint(). 15 1 16 2013-08-28 Antti Koivisto <antti@apple.com> 2 17 -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
r154706 r154775 391 391 bool MediaPlayerPrivateAVFoundationObjC::hasAvailableVideoFrame() const 392 392 { 393 return (m_videoFrameHasDrawn || (m_videoLayer && [m_videoLayer.get() isReadyForDisplay])); 393 if (currentRenderingMode() == MediaRenderingToLayer) 394 return m_videoLayer && [m_videoLayer.get() isReadyForDisplay]; 395 396 return m_videoFrameHasDrawn; 394 397 } 395 398 … … 788 791 return; 789 792 790 paint(context, rect);791 }792 793 void MediaPlayerPrivateAVFoundationObjC::paint(GraphicsContext* context, const IntRect& rect)794 {795 if (!metaDataAvailable() || context->paintingDisabled())796 return;797 798 793 setDelayCallbacks(true); 799 794 BEGIN_BLOCK_OBJC_EXCEPTIONS; … … 809 804 810 805 m_videoFrameHasDrawn = true; 806 } 807 808 void MediaPlayerPrivateAVFoundationObjC::paint(GraphicsContext* context, const IntRect& rect) 809 { 810 if (!metaDataAvailable() || context->paintingDisabled()) 811 return; 812 813 // We can ignore the request if we are already rendering to a layer. 814 if (currentRenderingMode() == MediaRenderingToLayer) 815 return; 816 817 paintCurrentFrameInContext(context, rect); 811 818 } 812 819
Note: See TracChangeset
for help on using the changeset viewer.