Changeset 171292 in webkit
- Timestamp:
- Jul 20, 2014, 11:16:44 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/Source/WebCore/ChangeLog ¶
r171289 r171292 21 21 * platform/SharedBuffer.cpp: 22 22 (WebCore::SharedBuffer::append): 23 24 2014-07-20 Jeremy Jones <jeremyj@apple.com> 25 26 Fix test crashes when cloning video layer since r171286 27 https://bugs.webkit.org/show_bug.cgi?id=135112 28 29 Unreviewed. Fix crashing tests by conditionalizing inline video layer change. 30 compositing/video/video-reflection.html [ Crash ] 31 media/video-layer-crash.html [ Crash ] 32 33 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: add conditional 34 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: ditto 35 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): ditto 36 (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer): ditto 37 (WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer): ditto 23 38 24 39 2014-07-20 Jeremy Jones <jeremyj@apple.com> -
TabularUnified trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h ¶
r171288 r171292 277 277 RetainPtr<AVPlayerItem> m_avPlayerItem; 278 278 RetainPtr<AVPlayerLayer> m_videoLayer; 279 #if PLATFORM(IOS) 279 280 RetainPtr<PlatformLayer> m_videoInlineLayer; 280 #if PLATFORM(IOS)281 281 RetainPtr<PlatformLayer> m_videoFullscreenLayer; 282 282 FloatRect m_videoFullscreenFrame; -
TabularUnified trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm ¶
r171288 r171292 587 587 [m_videoLayer setPlayer:m_avPlayer.get()]; 588 588 [m_videoLayer setBackgroundColor:cachedCGColor(Color::black, ColorSpaceDeviceRGB)]; 589 m_videoInlineLayer = adoptNS([[WebVideoContainerLayer alloc] init]);590 589 #ifndef NDEBUG 591 590 [m_videoLayer setName:@"MediaPlayerPrivate AVPlayerLayer"]; … … 594 593 updateVideoLayerGravity(); 595 594 IntSize defaultSize = player()->mediaPlayerClient() ? player()->mediaPlayerClient()->mediaPlayerContentBoxRect().pixelSnappedSize() : IntSize(); 595 LOG(Media, "MediaPlayerPrivateAVFoundationObjC::createVideoLayer(%p) - returning %p", this, m_videoLayer.get()); 596 597 #if PLATFORM(IOS) 598 m_videoInlineLayer = adoptNS([[WebVideoContainerLayer alloc] init]); 596 599 [m_videoInlineLayer setFrame:CGRectMake(0, 0, defaultSize.width(), defaultSize.height())]; 597 LOG(Media, "MediaPlayerPrivateAVFoundationObjC::createVideoLayer(%p) - returning %p", this, m_videoLayer.get());598 599 #if PLATFORM(IOS)600 600 if (m_videoFullscreenLayer) { 601 601 [m_videoLayer setFrame:[m_videoFullscreenLayer bounds]]; 602 602 [m_videoFullscreenLayer insertSublayer:m_videoLayer.get() atIndex:0]; 603 } else 604 #endif 605 { 603 } else { 606 604 [m_videoInlineLayer insertSublayer:m_videoLayer.get() atIndex:0]; 607 605 [m_videoLayer setFrame:m_videoInlineLayer.get().bounds]; 608 606 } 607 #else 608 [m_videoLayer setFrame:CGRectMake(0, 0, defaultSize.width(), defaultSize.height())]; 609 #endif 609 610 } 610 611 … … 622 623 if (m_videoFullscreenLayer) 623 624 [m_videoLayer removeFromSuperlayer]; 625 m_videoInlineLayer = nil; 624 626 #endif 625 627 626 628 m_videoLayer = nil; 627 m_videoInlineLayer = nil;628 629 } 629 630 … … 956 957 PlatformLayer* MediaPlayerPrivateAVFoundationObjC::platformLayer() const 957 958 { 959 #if PLATFORM(IOS) 958 960 return m_haveBeenAskedToCreateLayer ? m_videoInlineLayer.get() : nullptr; 961 #else 962 return m_haveBeenAskedToCreateLayer ? m_videoLayer.get() : nullptr; 963 #endif 959 964 } 960 965
Note:
See TracChangeset
for help on using the changeset viewer.