Bug 116490

Summary: Don't snapshot plugins that can't be snapshotted
Product: WebKit Reporter: Dean Jackson <dino>
Component: Plug-insAssignee: Dean Jackson <dino>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, thorton
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch (build test)
none
Patch thorton: review+

Description Dean Jackson 2013-05-20 18:59:42 PDT
The QuickTime plugin can't be snapshotted until we can capture the accelerated compositing. If we see a QT plugin in snapshot mode, restart it.

<rdar://problem/13918391>
Comment 1 Dean Jackson 2013-05-20 19:15:06 PDT
Created attachment 202370 [details]
Patch
Comment 2 Dean Jackson 2013-05-20 19:46:06 PDT
Created attachment 202372 [details]
Patch (build test)
Comment 3 Dean Jackson 2013-05-22 16:07:19 PDT
Created attachment 202629 [details]
Patch
Comment 4 Tim Horton 2013-05-22 16:12:04 PDT
Comment on attachment 202629 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=202629&action=review

> Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp:236
> +    if (m_waitingOnAsynchronousInitialization)
> +        return false;

Hmmmmmm.

> Source/WebKit2/WebProcess/Plugins/PluginView.cpp:579
> +        if (m_plugin->pluginLayer()) {
> +            if (frame()) {

All-in-one-if

> Source/WebKit2/WebProcess/Plugins/PluginView.cpp:1641
> +    if (!m_plugin->supportsSnapshotting() && m_pluginElement->isPlugInImageElement()) {

I think the first one is significantly more expensive to compute (needs IPC), should you swap these? (answer: it doesn't matter because this is not hot code at all).
Comment 5 Dean Jackson 2013-05-22 17:03:19 PDT
Committed r150556: <http://trac.webkit.org/changeset/150556>