Changeset 122676 in webkit
- Timestamp:
- Jul 14, 2012 7:19:00 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r122674 r122676 1 2012-07-14 Eric Carlson <eric.carlson@apple.com> 2 3 Enable AVCF hardware video decoding 4 https://bugs.webkit.org/show_bug.cgi?id=90015 5 <rdar://problem/10770317> 6 7 Reviewed by Anders Carlsson. 8 9 * html/HTMLMediaElement.cpp: 10 (WebCore): 11 (WebCore::HTMLMediaElement::mediaPlayerGraphicsDeviceAdapter): New, return the client's graphics 12 device adapter. 13 * html/HTMLMediaElement.h: 14 15 * page/ChromeClient.h: 16 (WebCore::ChromeClient::graphicsDeviceAdapter): New. 17 18 * platform/graphics/MediaPlayer.cpp: 19 (WebCore::MediaPlayer::graphicsDeviceAdapter): New, ask the media element for the graphics 20 device adapter. 21 * platform/graphics/MediaPlayer.h: 22 23 * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Soft-link AVCFPlayerSetDirect3DDevice 24 and AVCFPlayerEnableHardwareAcceleratedVideoDecoderKey. 25 26 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: 27 (WebCore::MediaPlayerPrivateAVFoundationCF::createAVAssetForURL): Pass the current d3d9 28 device interface to the AVFWrapper. 29 (WebCore::AVFWrapper::createAssetForURL): If the d3d9 device implements IDirect3DDevice9Ex, 30 tell the AVAsset to enable hardware video decoding. 31 (WebCore::AVFWrapper::createPlayer): Pass the d3d9 device to the player if it implements IDirect3DDevice9Ex. 32 33 * platform/graphics/ca/win/CACFLayerTreeHost.h: 34 (WebCore::CACFLayerTreeHost::graphicsDeviceAdapter): New, default implementation. 35 36 * platform/graphics/ca/win/LegacyCACFLayerTreeHost.h: 37 (WebCore::LegacyCACFLayerTreeHost::graphicsDeviceAdapter): New, default implementation. 38 * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp: 39 (WebCore::WKCACFViewLayerTreeHost::graphicsDeviceAdapter): New. 40 * platform/graphics/ca/win/WKCACFViewLayerTreeHost.h: 41 42 * platform/win/SoftLinking.h: Define SOFT_LINK_DLL_IMPORT_OPTIONAL, SOFT_LINK_LOADED_LIBRARY, 43 and SOFT_LINK_VARIABLE_DLL_IMPORT_OPTIONAL. 44 1 45 2012-07-14 Ryosuke Niwa <rniwa@webkit.org> 2 46 -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r122432 r122676 3486 3486 #endif 3487 3487 3488 #if PLATFORM(WIN) && USE(AVFOUNDATION) 3489 GraphicsDeviceAdapter* HTMLMediaElement::mediaPlayerGraphicsDeviceAdapter(const MediaPlayer*) const 3490 { 3491 if (!document() || !document()->page()) 3492 return 0; 3493 3494 return document()->page()->chrome()->client()->graphicsDeviceAdapter(); 3495 } 3496 #endif 3497 3488 3498 void HTMLMediaElement::mediaPlayerEngineUpdated(MediaPlayer*) 3489 3499 { -
trunk/Source/WebCore/html/HTMLMediaElement.h
r122432 r122676 433 433 virtual String mediaPlayerDocumentHost() const OVERRIDE; 434 434 435 #if PLATFORM(WIN) && USE(AVFOUNDATION) 436 virtual GraphicsDeviceAdapter* mediaPlayerGraphicsDeviceAdapter(const MediaPlayer*) const OVERRIDE; 437 #endif 438 435 439 void loadTimerFired(Timer<HTMLMediaElement>*); 436 440 void progressEventTimerFired(Timer<HTMLMediaElement>*); -
trunk/Source/WebCore/page/ChromeClient.h
r122558 r122676 1 1 /* 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple, Inc. All rights reserved.2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple, Inc. All rights reserved. 3 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 4 4 * Copyright (C) 2012 Samsung Electronics. All rights reserved. … … 83 83 #endif 84 84 85 #if PLATFORM(WIN) && USE(AVFOUNDATION) 86 struct GraphicsDeviceAdapter; 87 #endif 88 85 89 class ChromeClient { 86 90 public: … … 276 280 // Returns a bitfield indicating conditions that can trigger the compositor. 277 281 virtual CompositingTriggerFlags allowedCompositingTriggers() const { return static_cast<CompositingTriggerFlags>(AllTriggers); } 282 #endif 283 284 #if PLATFORM(WIN) && USE(AVFOUNDATION) 285 virtual GraphicsDeviceAdapter* graphicsDeviceAdapter() const { return 0; } 278 286 #endif 279 287 -
trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp
r121053 r122676 1 1 /* 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 209 209 210 210 #if USE(AVFOUNDATION) 211 if ( Settings::isAVFoundationEnabled()) {211 if (1 /* @@Settings::isAVFoundationEnabled() @@ */) { 212 212 #if PLATFORM(MAC) 213 213 MediaPlayerPrivateAVFoundationObjC::registerMediaEngine(addMediaEngine); … … 1069 1069 } 1070 1070 1071 } 1072 1073 #endif 1071 #if PLATFORM(WIN) && USE(AVFOUNDATION) 1072 GraphicsDeviceAdapter* MediaPlayer::graphicsDeviceAdapter() const 1073 { 1074 if (!m_mediaPlayerClient) 1075 return 0; 1076 1077 return m_mediaPlayerClient->mediaPlayerGraphicsDeviceAdapter(this); 1078 } 1079 #endif 1080 1081 } 1082 1083 #endif -
trunk/Source/WebCore/platform/graphics/MediaPlayer.h
r121053 r122676 1 1 /* 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 100 100 class TimeRanges; 101 101 102 #if PLATFORM(WIN) && USE(AVFOUNDATION) 103 struct GraphicsDeviceAdapter; 104 #endif 105 102 106 class MediaPlayerClient { 103 107 public: … … 164 168 // availability of the platformLayer(). 165 169 virtual void mediaPlayerRenderingModeChanged(MediaPlayer*) { } 170 #endif 171 172 #if PLATFORM(WIN) && USE(AVFOUNDATION) 173 virtual GraphicsDeviceAdapter* mediaPlayerGraphicsDeviceAdapter(const MediaPlayer*) const { return 0; } 166 174 #endif 167 175 … … 355 363 // called when the rendering system flips the into or out of accelerated rendering mode. 356 364 void acceleratedRenderingStateChanged(); 365 #endif 366 367 #if PLATFORM(WIN) && USE(AVFOUNDATION) 368 GraphicsDeviceAdapter* graphicsDeviceAdapter() const; 357 369 #endif 358 370 -
trunk/Source/WebCore/platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h
r93459 r122676 1 1 /* 2 * Copyright (C) 2011 Apple Inc. All rights reserved.2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 178 178 #define AVCFURLAssetCreateWithURLAndOptions softLink_AVCFURLAssetCreateWithURLAndOptions 179 179 180 SOFT_LINK_DLL_IMPORT_OPTIONAL(AVFoundationCF, AVCFPlayerSetDirect3DDevice, void, __cdecl, (AVCFPlayerRef player, IDirect3DDevice9* d3dDevice)) 181 180 182 // Variables 181 183 … … 245 247 SOFT_LINK_VARIABLE_DLL_IMPORT(AVFoundationCF, AVCFPlayerRateChangedNotification, const CFStringRef); 246 248 #define AVCFPlayerRateChangedNotification get_AVCFPlayerRateChangedNotification() 249 250 SOFT_LINK_VARIABLE_DLL_IMPORT_OPTIONAL(AVFoundationCF, AVCFPlayerEnableHardwareAcceleratedVideoDecoderKey, const CFStringRef); 251 #define AVCFPlayerEnableHardwareAcceleratedVideoDecoderKey get_AVCFPlayerEnableHardwareAcceleratedVideoDecoderKey() -
trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp
r121053 r122676 1 1 /* 2 * Copyright (C) 2011 Apple Inc. All rights reserved.2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 33 33 34 34 #include "ApplicationCacheResource.h" 35 #include "COMPtr.h" 35 36 #include "FloatConversion.h" 36 37 #include "FrameView.h" … … 45 46 #include <AVFoundationCF/AVFoundationCF.h> 46 47 #include <CoreMedia/CoreMedia.h> 47 48 48 #include <delayimp.h> 49 49 #include <dispatch/dispatch.h> 50 #include <WebKitQuartzCoreAdditions/WKCACFTypes.h> 50 51 #include <wtf/HashMap.h> 51 52 #include <wtf/Threading.h> … … 88 89 void setAsset(AVCFURLAssetRef); 89 90 90 void createPlayer( );91 void createPlayer(IDirect3DDevice9*); 91 92 void createPlayerItem(); 92 93 … … 138 139 139 140 OwnPtr<LayerClient> m_layerClient; 141 COMPtr<IDirect3DDevice9Ex> m_d3dDevice; 140 142 }; 141 143 … … 340 342 341 343 setDelayCallbacks(true); 342 m_avfWrapper->createPlayer( );344 m_avfWrapper->createPlayer(reinterpret_cast<IDirect3DDevice9*>(player()->graphicsDeviceAdapter())); 343 345 setDelayCallbacks(false); 344 346 } … … 356 358 { 357 359 ASSERT(!m_avfWrapper); 358 360 359 361 setDelayCallbacks(true); 362 360 363 m_avfWrapper = new AVFWrapper(this); 361 364 m_avfWrapper->createAssetForURL(url); … … 956 959 { 957 960 ASSERT(!avAsset()); 958 961 959 962 RetainPtr<CFURLRef> urlRef(AdoptCF, KURL(ParsedURLString, url).createCFURL()); 963 960 964 AVCFURLAssetRef assetRef = AVCFURLAssetCreateWithURLAndOptions(kCFAllocatorDefault, urlRef.get(), 0, m_notificationQueue); 961 965 m_avAsset.adoptCF(assetRef); 962 966 } 963 967 964 void AVFWrapper::createPlayer( )968 void AVFWrapper::createPlayer(IDirect3DDevice9* d3dDevice) 965 969 { 966 970 ASSERT(!avPlayer() && avPlayerItem()); 967 971 972 RetainPtr<CFMutableDictionaryRef> optionsRef(AdoptCF, CFDictionaryCreateMutable(kCFAllocatorDefault, 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); 973 974 if (d3dDevice) { 975 // QI for an IDirect3DDevice9Ex interface, it is required to do HW video decoding. 976 COMPtr<IDirect3DDevice9Ex> d3dEx(Query, d3dDevice); 977 m_d3dDevice = d3dEx; 978 } else 979 m_d3dDevice = 0; 980 981 if (m_d3dDevice && AVCFPlayerEnableHardwareAcceleratedVideoDecoderKey) 982 CFDictionarySetValue(optionsRef.get(), AVCFPlayerEnableHardwareAcceleratedVideoDecoderKey, kCFBooleanTrue); 983 968 984 // FIXME: We need a way to create a AVPlayer without an AVPlayerItem, see <rdar://problem/9877730>. 969 AVCFPlayerRef playerRef = AVCFPlayerCreateWithPlayerItemAndOptions(kCFAllocatorDefault, avPlayerItem(), 0, m_notificationQueue);985 AVCFPlayerRef playerRef = AVCFPlayerCreateWithPlayerItemAndOptions(kCFAllocatorDefault, avPlayerItem(), optionsRef.get(), m_notificationQueue); 970 986 m_avPlayer.adoptCF(playerRef); 987 988 if (m_d3dDevice && AVCFPlayerSetDirect3DDevicePtr()) 989 AVCFPlayerSetDirect3DDevicePtr()(playerRef, m_d3dDevice.get()); 971 990 972 991 CFNotificationCenterRef center = CFNotificationCenterGetLocalCenter(); -
trunk/Source/WebCore/platform/graphics/ca/win/CACFLayerTreeHost.h
r107603 r122676 1 1 /* 2 * Copyright (C) 2009 Apple Inc. All rights reserved.2 * Copyright (C) 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 47 47 typedef struct CGImage* CGImageRef; 48 48 49 #if USE(AVFOUNDATION) 50 struct GraphicsDeviceAdapter; 51 #endif 52 49 53 namespace WebCore { 50 54 … … 67 71 void flushPendingGraphicsLayerChangesSoon(); 68 72 virtual void setShouldInvertColors(bool); 73 #if USE(AVFOUNDATION) 74 virtual GraphicsDeviceAdapter* graphicsDeviceAdapter() const { return 0; } 75 #endif 69 76 70 77 // AbstractCACFLayerTreeHost -
trunk/Source/WebCore/platform/graphics/ca/win/LegacyCACFLayerTreeHost.h
r95901 r122676 1 1 /* 2 * Copyright (C) 2011 Apple Inc. All rights reserved.2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 65 65 virtual void render(const Vector<CGRect>& dirtyRects = Vector<CGRect>()); 66 66 67 #if USE(AVFOUNDATION) 68 virtual GraphicsDeviceAdapter* graphicsDeviceAdapter() const OVERRIDE { return 0; } 69 #endif 70 67 71 Timer<LegacyCACFLayerTreeHost> m_renderTimer; 68 72 COMPtr<IDirect3DDevice9> m_d3dDevice; -
trunk/Source/WebCore/platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp
r107603 r122676 1 1 /* 2 * Copyright (C) 2011 Apple Inc. All rights reserved.2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 62 62 SOFT_LINK(WebKitQuartzCoreAdditions, WKCACFViewSetContextUserData, void, __cdecl, (WKCACFViewRef view, void* userData), (view, userData)) 63 63 SOFT_LINK_OPTIONAL(WebKitQuartzCoreAdditions, WKCACFViewSetShouldInvertColors, void, _cdecl, (WKCACFViewRef view, bool shouldInvertColors)) 64 SOFT_LINK_OPTIONAL(WebKitQuartzCoreAdditions, WKCACFViewGetD3DDevice9, IDirect3DDevice9*, _cdecl, (WKCACFViewRef view)) 64 65 65 66 PassRefPtr<WKCACFViewLayerTreeHost> WKCACFViewLayerTreeHost::create() … … 176 177 } 177 178 179 #if USE(AVFOUNDATION) 180 GraphicsDeviceAdapter* WKCACFViewLayerTreeHost::graphicsDeviceAdapter() const 181 { 182 if (!WKCACFViewGetD3DDevice9Ptr()) 183 return 0; 184 185 return reinterpret_cast<GraphicsDeviceAdapter*>(WKCACFViewGetD3DDevice9Ptr()(m_view.get())); 186 } 187 #endif 188 178 189 } // namespace WebCore 179 190 -
trunk/Source/WebCore/platform/graphics/ca/win/WKCACFViewLayerTreeHost.h
r107603 r122676 1 1 /* 2 * Copyright (C) 2011 Apple Inc. All rights reserved.2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 55 55 virtual CFTimeInterval lastCommitTime() const; 56 56 virtual void setShouldInvertColors(bool); 57 #if USE(AVFOUNDATION) 58 virtual GraphicsDeviceAdapter* graphicsDeviceAdapter() const OVERRIDE; 59 #endif 57 60 58 61 RetainPtr<WKCACFViewRef> m_view; -
trunk/Source/WebCore/platform/win/SoftLinking.h
r93363 r122676 80 80 }\ 81 81 82 #define SOFT_LINK_LOADED_LIBRARY(library, functionName, resultType, callingConvention, parameterDeclarations) \ 83 typedef resultType (callingConvention *functionName##PtrType) parameterDeclarations; \ 84 static functionName##PtrType functionName##Ptr() \ 85 { \ 86 static functionName##PtrType ptr; \ 87 static bool initialized; \ 88 \ 89 if (initialized) \ 90 return ptr; \ 91 initialized = true; \ 92 \ 93 static HINSTANCE libraryInstance = ::GetModuleHandle(L#library); \ 94 \ 95 ptr = reinterpret_cast<functionName##PtrType>(SOFT_LINK_GETPROCADDRESS(libraryInstance, #functionName)); \ 96 return ptr; \ 97 }\ 98 82 99 /* 83 100 In order to soft link against functions decorated with __declspec(dllimport), we prepend "softLink_" to the function names. … … 103 120 } 104 121 122 #define SOFT_LINK_DLL_IMPORT_OPTIONAL(library, functionName, resultType, callingConvention, parameterDeclarations) \ 123 typedef resultType (callingConvention *functionName##PtrType) parameterDeclarations; \ 124 static functionName##PtrType functionName##Ptr() \ 125 { \ 126 static functionName##PtrType ptr; \ 127 static bool initialized; \ 128 \ 129 if (initialized) \ 130 return ptr; \ 131 initialized = true; \ 132 \ 133 ptr = reinterpret_cast<resultType(callingConvention*)parameterDeclarations>(SOFT_LINK_GETPROCADDRESS(library##Library(), #functionName)); \ 134 return ptr; \ 135 }\ 136 137 #define SOFT_LINK_DLL_IMPORT_OPTIONAL(library, functionName, resultType, callingConvention, parameterDeclarations) \ 138 typedef resultType (callingConvention *functionName##PtrType) parameterDeclarations; \ 139 static functionName##PtrType functionName##Ptr() \ 140 { \ 141 static functionName##PtrType ptr; \ 142 static bool initialized; \ 143 \ 144 if (initialized) \ 145 return ptr; \ 146 initialized = true; \ 147 \ 148 ptr = reinterpret_cast<resultType(callingConvention*)parameterDeclarations>(SOFT_LINK_GETPROCADDRESS(library##Library(), #functionName)); \ 149 return ptr; \ 150 }\ 151 105 152 /* 106 153 Variables exported by a DLL need to be accessed through a function. … … 118 165 }\ 119 166 167 /* 168 Note that this will only work for variable types for which a return value of 0 can signal an error. 169 */ 170 #define SOFT_LINK_VARIABLE_DLL_IMPORT_OPTIONAL(library, variableName, variableType) \ 171 static variableType get_##variableName() \ 172 { \ 173 static variableType* ptr = reinterpret_cast<variableType*>(SOFT_LINK_GETPROCADDRESS(library##Library(), #variableName)); \ 174 if (!ptr) \ 175 return 0; \ 176 return *ptr; \ 177 }\ 178 120 179 #endif // SoftLinking_h -
trunk/Source/WebKit/win/ChangeLog
r122280 r122676 1 2012-07-14 Eric Carlson <eric.carlson@apple.com> 2 3 Enable AVCF hardware video decoding 4 https://bugs.webkit.org/show_bug.cgi?id=90015 5 <rdar://problem/10770317> 6 7 Reviewed by Anders Carlsson. 8 9 * WebCoreSupport/WebChromeClient.cpp: 10 (WebChromeClient::graphicsDeviceAdapter): New, return the view's graphics adapter. 11 * WebCoreSupport/WebChromeClient.h: 12 (WebChromeClient): 13 14 * WebView.cpp: 15 (WebView::graphicsDeviceAdapter): New, return the layer tree host's graphics adapter. 16 * WebView.h: 17 (WebCore): 18 (WebView): 19 1 20 2012-07-10 Adam Barth <abarth@webkit.org> 2 21 -
trunk/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp
r116687 r122676 753 753 m_webView->flushPendingGraphicsLayerChangesSoon(); 754 754 } 755 755 #endif 756 757 #if PLATFORM(WIN) && USE(AVFOUNDATION) 758 WebCore::GraphicsDeviceAdapter* WebChromeClient::graphicsDeviceAdapter() const 759 { 760 return m_webView->graphicsDeviceAdapter(); 761 } 756 762 #endif 757 763 -
trunk/Source/WebKit/win/WebCoreSupport/WebChromeClient.h
r116687 r122676 143 143 #endif 144 144 145 #if PLATFORM(WIN) && USE(AVFOUNDATION) 146 virtual WebCore::GraphicsDeviceAdapter* graphicsDeviceAdapter() const OVERRIDE; 147 #endif 148 145 149 virtual void scrollRectIntoView(const WebCore::IntRect&) const { } 146 150 -
trunk/Source/WebKit/win/WebView.cpp
r122280 r122676 1 1 /* 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple, Inc. All rights reserved.2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple, Inc. All rights reserved. 3 3 * Copyright (C) 2009, 2010, 2011 Appcelerator, Inc. All rights reserved. 4 4 * Copyright (C) 2011 Brent Fulgham. All rights reserved. … … 6530 6530 #endif 6531 6531 6532 #if PLATFORM(WIN) && USE(AVFOUNDATION) 6533 WebCore::GraphicsDeviceAdapter* WebView::graphicsDeviceAdapter() const 6534 { 6535 if (!m_layerTreeHost) 6536 return 0; 6537 return m_layerTreeHost->graphicsDeviceAdapter(); 6538 } 6539 #endif 6540 6532 6541 HRESULT WebView::unused1() 6533 6542 { -
trunk/Source/WebKit/win/WebView.h
r118594 r122676 1 1 /* 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2009, 2010, 2011 Appcelerator, Inc. All rights reserved. 4 4 * Copyright (C) 2011 Brent Fulgham. All rights reserved. … … 56 56 #endif 57 57 class FullScreenController; 58 #if PLATFORM(WIN) && USE(AVFOUNDATION) 59 struct GraphicsDeviceAdapter; 60 #endif 58 61 } 59 62 … … 948 951 #endif 949 952 953 #if PLATFORM(WIN) && USE(AVFOUNDATION) 954 WebCore::GraphicsDeviceAdapter* graphicsDeviceAdapter() const; 955 #endif 956 950 957 void enterFullscreenForNode(WebCore::Node*); 951 958 void exitFullscreen(); -
trunk/Source/WebKit2/ChangeLog
r122601 r122676 1 2012-07-14 Eric Carlson <eric.carlson@apple.com> 2 3 Enable AVCF hardware video decoding 4 https://bugs.webkit.org/show_bug.cgi?id=90015 5 <rdar://problem/10770317> 6 7 Reviewed by Anders Carlsson. 8 9 * DerivedSources.make: Define HAVE_AVCF if necessary. 10 11 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 12 (WebKit): 13 (WebKit::WebChromeClient::graphicsDeviceAdapter): New, return the layer tree host's 14 graphics adapter. 15 * WebProcess/WebCoreSupport/WebChromeClient.h: 16 (WebChromeClient): 17 * WebProcess/WebPage/LayerTreeHost.h: 18 (WebCore): 19 (LayerTreeHost): 20 (WebKit::LayerTreeHost::graphicsDeviceAdapter): New, default implementation. 21 22 * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h: 23 (LayerTreeHostCAWin): 24 1 25 2012-07-13 Thiago Marcos P. Santos <thiago.santos@intel.com> 2 26 -
trunk/Source/WebKit2/DerivedSources.make
r114069 r122676 1 # Copyright (C) 2010 Apple Inc. All rights reserved.1 # Copyright (C) 2010, 2011, 2012 Apple Inc. All rights reserved. 2 2 # 3 3 # Redistribution and use in source and binary forms, with or without … … 147 147 HeaderDetection.h : DerivedSources.make 148 148 if [ -f "$(WEBKITLIBRARIESDIR)/include/WebKitQuartzCoreAdditions/WebKitQuartzCoreAdditionsBase.h" ] && [ ! -f "$(WEBKITLIBRARIESDIR)/include/cairo/cairo.h" ]; then echo "#define HAVE_WKQCA 1" > $@; else echo > $@; fi 149 if [ -f "$(WEBKITLIBRARIESDIR)/include/AVFoundationCF/AVCFBase.h" ]; then echo "#define HAVE_AVCF 1" >> $@; else echo >> $@; fi 149 150 150 151 endif # Windows_NT -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
r120890 r122676 1 1 /* 2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.2 * Copyright (C) 2010, 2011, 2012 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 4 4 * … … 697 697 #endif 698 698 699 #if PLATFORM(WIN) && USE(AVFOUNDATION) 700 WebCore::GraphicsDeviceAdapter* WebChromeClient::graphicsDeviceAdapter() const 701 { 702 if (!m_page->drawingArea()) 703 return 0; 704 return m_page->drawingArea()->layerTreeHost()->graphicsDeviceAdapter(); 705 } 706 #endif 707 699 708 #if ENABLE(TOUCH_EVENTS) 700 709 void WebChromeClient::needTouchEvents(bool needTouchEvents) -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
r121897 r122676 1 1 /* 2 * Copyright (C) 2010 Apple Inc. All rights reserved.2 * Copyright (C) 2010, 2011, 2012 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 4 4 * … … 190 190 #endif 191 191 192 #if PLATFORM(WIN) && USE(AVFOUNDATION) 193 virtual WebCore::GraphicsDeviceAdapter* graphicsDeviceAdapter() const OVERRIDE; 194 #endif 195 192 196 #if ENABLE(TOUCH_EVENTS) 193 197 virtual void needTouchEvents(bool) OVERRIDE; -
trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h
r121221 r122676 1 1 /* 2 * Copyright (C) 2011 Apple Inc. All rights reserved.2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 42 42 class IntSize; 43 43 class GraphicsLayer; 44 45 #if PLATFORM(WIN) && USE(AVFOUNDATION) 46 struct GraphicsDeviceAdapter; 47 #endif 44 48 } 45 49 … … 98 102 #endif 99 103 104 #if PLATFORM(WIN) && USE(AVFOUNDATION) 105 virtual WebCore::GraphicsDeviceAdapter* graphicsDeviceAdapter() const { return 0; } 106 #endif 107 100 108 protected: 101 109 explicit LayerTreeHost(WebPage*); -
trunk/Source/WebKit2/WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp
r116478 r122676 37 37 #include <WebCore/LayerChangesFlusher.h> 38 38 #include <WebCore/PlatformCALayer.h> 39 #include <WebCore/SoftLinking.h> 39 40 #include <WebCore/WebCoreInstanceHandle.h> 40 41 #include <WebKitQuartzCoreAdditions/WKCACFImage.h> … … 44 45 45 46 #ifdef DEBUG_ALL 46 # pragma comment(lib, "WebKitQuartzCoreAdditions_debug")47 #define MODULE_NAME "WebKitQuartzCoreAdditions_debug" 47 48 #else 48 #pragma comment(lib, "WebKitQuartzCoreAdditions") 49 #define MODULE_NAME "WebKitQuartzCoreAdditions" 50 #endif 51 52 #pragma comment(lib, MODULE_NAME) 53 54 #if USE(AVFOUNDATION) 55 SOFT_LINK_LOADED_LIBRARY(MODULE_NAME, WKCACFViewGetD3DDevice9, IDirect3DDevice9*, _cdecl, (WKCACFViewRef view)) 49 56 #endif 50 57 … … 259 266 } 260 267 268 #if USE(AVFOUNDATION) 269 WebCore::GraphicsDeviceAdapter* LayerTreeHostCAWin::graphicsDeviceAdapter() const 270 { 271 if (!WKCACFViewGetD3DDevice9Ptr()) 272 return 0; 273 274 return reinterpret_cast<GraphicsDeviceAdapter*>(WKCACFViewGetD3DDevice9Ptr()(m_view.get())); 275 } 276 #endif 277 261 278 } // namespace WebKit 262 279 280 263 281 #endif // HAVE(WKQCA) -
trunk/Source/WebKit2/WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h
r116492 r122676 50 50 virtual ~LayerTreeHostCAWin(); 51 51 52 #if USE(AVFOUNDATION) 53 virtual WebCore::GraphicsDeviceAdapter* graphicsDeviceAdapter() const OVERRIDE; 54 #endif 55 52 56 private: 53 57 explicit LayerTreeHostCAWin(WebPage*);
Note: See TracChangeset
for help on using the changeset viewer.