Changeset 53195 in webkit


Ignore:
Timestamp:
Jan 13, 2010 12:34:01 PM (14 years ago)
Author:
kdecker@apple.com
Message:

https://bugs.webkit.org/show_bug.cgi?id=33610
<rdar://problem/7288546> Silverlight full screen performance problem seen on Snow Leopard.


  • Plugins/WebNetscapePluginView.mm: (-[WebNetscapePluginView _workaroundSilverlightFullScreenBug:]): Added. Work around Silverlight full screen performance issue by maintaining an accelerated GL pixel format. We can safely remove this at some point in the future when both Microsoft releases a genuine fix for 7288546 and enough Silverlight users update to the new Silverlight. For now, we'll distinguish older broken versions of Silverlight by asking the plug-in if it resolved its full screen badness. (-[WebNetscapePluginView _createPlugin]): Call _workaroundSilverlightFullScreenBug:YES if this is Silverlight. (-[WebNetscapePluginView _destroyPlugin]): Call _workaroundSilverlightFullScreenBug:NO if this is Silverlight.

https://bugs.webkit.org/show_bug.cgi?id=33610
<rdar://problem/7288546> Silverlight full screen performance problem seen on Snow Leopard.

  • WebKit.xcodeproj/project.pbxproj: Link the project against OpenGL.
Location:
trunk/WebKit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/ChangeLog

    r52563 r53195  
     12010-01-13  Kevin Decker  <kdecker@apple.com>
     2
     3        Reviewed by Mark Rowe.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=33610
     6        <rdar://problem/7288546> Silverlight full screen performance problem seen on Snow Leopard.
     7
     8         * WebKit.xcodeproj/project.pbxproj: Link the project against OpenGL.
     9
    1102009-12-25  Darin Adler  <darin@apple.com>
    211
  • trunk/WebKit/WebKit.xcodeproj/project.pbxproj

    r52368 r53195  
    1616                0AB752370FA2E4DB00D7CBB1 /* WebNetscapeContainerCheckContextInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AB752350FA2E4DB00D7CBB1 /* WebNetscapeContainerCheckContextInfo.h */; };
    1717                0AB752380FA2E4DB00D7CBB1 /* WebNetscapeContainerCheckContextInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0AB752360FA2E4DB00D7CBB1 /* WebNetscapeContainerCheckContextInfo.mm */; };
     18                0ACE917310FE47E30096A45F /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0ACE917210FE47E30096A45F /* OpenGL.framework */; };
    1819                0AEBFF630F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AEBFF610F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
    1920                0AEBFF640F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0AEBFF620F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.mm */; };
     
    367368                0AB752350FA2E4DB00D7CBB1 /* WebNetscapeContainerCheckContextInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNetscapeContainerCheckContextInfo.h; sourceTree = "<group>"; };
    368369                0AB752360FA2E4DB00D7CBB1 /* WebNetscapeContainerCheckContextInfo.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebNetscapeContainerCheckContextInfo.mm; sourceTree = "<group>"; };
     370                0ACE917210FE47E30096A45F /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
    369371                0AEBFF610F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; path = WebNetscapeContainerCheckPrivate.h; sourceTree = "<group>"; };
    370372                0AEBFF620F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebNetscapeContainerCheckPrivate.mm; sourceTree = "<group>"; };
     
    728730                                9398112F0824BF01008DF038 /* Security.framework in Frameworks */,
    729731                                9398112C0824BF01008DF038 /* WebCore.framework in Frameworks */,
     732                                0ACE917310FE47E30096A45F /* OpenGL.framework in Frameworks */,
    730733                        );
    731734                        runOnlyForDeploymentPostprocessing = 0;
     
    780783                                830E81E005853AC000AD0891 /* Security.framework */,
    781784                                F738C9EA03FAD3DF0321FBE0 /* WebCore.framework */,
     785                                0ACE917210FE47E30096A45F /* OpenGL.framework */,
    782786                        );
    783787                        name = "Frameworks and Libraries";
  • trunk/WebKit/mac/ChangeLog

    r53178 r53195  
     12010-01-13  Kevin Decker  <kdecker@apple.com>
     2
     3        Reviewed by Mark Rowe.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=33610
     6        <rdar://problem/7288546> Silverlight full screen performance problem seen on Snow Leopard.
     7       
     8        * Plugins/WebNetscapePluginView.mm:
     9        (-[WebNetscapePluginView _workaroundSilverlightFullScreenBug:]): Added. Work around Silverlight full screen
     10         performance issue by maintaining an accelerated GL pixel format. We can safely remove this at some point in
     11         the future when both Microsoft releases a genuine fix for 7288546 and enough Silverlight users update to the
     12         new Silverlight. For now, we'll distinguish older broken versions of Silverlight by asking the plug-in if it
     13         resolved its full screen badness.
     14        (-[WebNetscapePluginView _createPlugin]): Call _workaroundSilverlightFullScreenBug:YES if this is Silverlight.
     15        (-[WebNetscapePluginView _destroyPlugin]): Call _workaroundSilverlightFullScreenBug:NO if this is Silverlight.
     16
    1172010-01-11  Mark Rowe  <mrowe@apple.com>
    218
  • trunk/WebKit/mac/Plugins/WebNetscapePluginView.mm

    r53110 r53195  
    8383#define LoginWindowDidSwitchToUserNotification      @"WebLoginWindowDidSwitchToUserNotification"
    8484#define WKNVSupportsCompositingCoreAnimationPluginsBool 74656  /* TRUE if the browser supports hardware compositing of Core Animation plug-ins  */
     85static const int WKNVSilverlightFullScreenPerformanceIssueFixed = 7288546; /* TRUE if Siverlight addressed its underlying  bug in <rdar://problem/7288546> */
    8586
    8687using namespace WebCore;
     
    23202321}
    23212322
     2323// Work around Silverlight full screen performance issue by maintaining an accelerated GL pixel format.
     2324// We can safely remove it at some point in the future when both:
     2325// 1) Microsoft releases a genuine fix for 7288546.
     2326// 2) Enough Silverlight users update to the new Silverlight.
     2327// For now, we'll distinguish older broken versions of Silverlight by asking the plug-in if it resolved its full screen badness.
     2328- (void)_workaroundSilverlightFullScreenBug:(BOOL)initializedPlugin
     2329{
     2330#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
     2331    ASSERT(_isSilverlight);
     2332    NPBool isFullScreenPerformanceIssueFixed = 0;
     2333    NPPluginFuncs *pluginFuncs = [_pluginPackage.get() pluginFuncs];
     2334    if (pluginFuncs->getvalue && pluginFuncs->getvalue(plugin, static_cast<NPPVariable>(WKNVSilverlightFullScreenPerformanceIssueFixed), &isFullScreenPerformanceIssueFixed) == NPERR_NO_ERROR && isFullScreenPerformanceIssueFixed)
     2335        return;
     2336   
     2337    static CGLPixelFormatObj pixelFormatObject = 0;
     2338    static unsigned refCount = 0;
     2339   
     2340    if (initializedPlugin) {
     2341        refCount++;
     2342        if (refCount == 1) {
     2343            const CGLPixelFormatAttribute attributes[] = { kCGLPFAAccelerated, static_cast<CGLPixelFormatAttribute>(0) };
     2344            GLint npix;
     2345            CGLChoosePixelFormat(attributes, &pixelFormatObject, &npix);
     2346        } 
     2347    } else {
     2348        ASSERT(pixelFormatObject);
     2349        refCount--;
     2350        if (!refCount)
     2351            CGLReleasePixelFormat(pixelFormatObject);
     2352    }
     2353#endif
     2354}
     2355
    23222356- (NPError)_createPlugin
    23232357{
     
    23382372    NPError npErr = [_pluginPackage.get() pluginFuncs]->newp((char *)[_MIMEType.get() cString], plugin, _mode, argsCount, cAttributes, cValues, NULL);
    23392373    [[self class] setCurrentPluginView:nil];
     2374    if (_isSilverlight)
     2375        [self _workaroundSilverlightFullScreenBug:YES];
    23402376    LOG(Plugins, "NPP_New: %d", npErr);
    23412377    return npErr;
     
    23452381{
    23462382    PluginMainThreadScheduler::scheduler().unregisterPlugin(plugin);
     2383   
     2384    if (_isSilverlight)
     2385        [self _workaroundSilverlightFullScreenBug:NO];
    23472386   
    23482387    NPError npErr;
Note: See TracChangeset for help on using the changeset viewer.