Changeset 185763 in webkit
- Timestamp:
- Jun 19, 2015, 12:28:52 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r185762 r185763 1 2015-06-19 Jeremy Jones <jeremyj@apple.com> 2 3 Get CAContext directly for CALayer instead of walking the layer tree. 4 https://bugs.webkit.org/show_bug.cgi?id=146138 5 <rdar://problem/21455974> 6 7 Reviewed by Darin Adler. 8 9 This will get the context directly from the CALayer instead of getting all CAContexts, walking the layer tree 10 to the root and comparing that against each CAContext's root layer. 11 12 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: 13 (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer): 14 1 15 2015-06-18 Brent Fulgham <bfulgham@apple.com> 2 16 -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
r185727 r185763 1106 1106 [CATransaction setDisableActions:YES]; 1107 1107 1108 CALayer *oldRootLayer = videoFullscreenLayer; 1109 while (oldRootLayer.superlayer) 1110 oldRootLayer = oldRootLayer.superlayer; 1111 1112 CALayer *newRootLayer = nil; 1108 CAContext *oldContext = [m_videoLayer context]; 1109 CAContext *newContext = nil; 1113 1110 1114 1111 if (m_videoFullscreenLayer && m_videoLayer) { … … 1116 1113 [m_videoLayer removeFromSuperlayer]; 1117 1114 [m_videoFullscreenLayer insertSublayer:m_videoLayer.get() atIndex:0]; 1118 new RootLayer = m_videoFullscreenLayer.get();1115 newContext = [m_videoFullscreenLayer context]; 1119 1116 } else if (m_videoInlineLayer && m_videoLayer) { 1120 1117 [m_videoLayer setFrame:[m_videoInlineLayer bounds]]; 1121 1118 [m_videoLayer removeFromSuperlayer]; 1122 1119 [m_videoInlineLayer insertSublayer:m_videoLayer.get() atIndex:0]; 1123 new RootLayer = m_videoInlineLayer.get();1120 newContext = [m_videoInlineLayer context]; 1124 1121 } else if (m_videoLayer) 1125 1122 [m_videoLayer removeFromSuperlayer]; 1126 1123 1127 while (newRootLayer.superlayer) 1128 newRootLayer = newRootLayer.superlayer; 1129 1130 if (oldRootLayer && newRootLayer && oldRootLayer != newRootLayer) { 1131 mach_port_t fencePort = 0; 1132 for (CAContext *context in [CAContext allContexts]) { 1133 if (context.layer == oldRootLayer || context.layer == newRootLayer) { 1134 if (!fencePort) 1135 fencePort = [context createFencePort]; 1136 else 1137 [context setFencePort:fencePort]; 1138 } 1139 } 1124 if (oldContext && newContext && oldContext != newContext) { 1125 mach_port_t fencePort = [oldContext createFencePort]; 1126 [newContext setFencePort:fencePort]; 1140 1127 mach_port_deallocate(mach_task_self(), fencePort); 1141 1128 }
Note:
See TracChangeset
for help on using the changeset viewer.