Bug 58637 - REGRESSION: Rendering in <video> element appears to render quickly to catch up if it has been playing in a background tab
Summary: REGRESSION: Rendering in <video> element appears to render quickly to catch u...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.6
: P2 Normal
Assignee: Jer Noble
URL: http://flyingmeat.com/stuff/doubledou...
Keywords: InRadar, PlatformOnly
Depends on:
Reported: 2011-04-14 23:21 PDT by Jer Noble
Modified: 2011-04-15 11:07 PDT (History)
2 users (show)

See Also:

Patch (8.53 KB, patch)
2011-04-14 23:27 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (8.53 KB, patch)
2011-04-15 10:34 PDT, Jer Noble
eric.carlson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2011-04-14 23:21:53 PDT
1. Load <http://flyingmeat.com/stuff/doubledoubleyourstrokestyle.mov> in a tab, then switch to a background tab.
2. Wait around 30 seconds.
3. Switch back to the tab with the video.

The video renders at high speed as it catches back up to the correct playback position.
Comment 1 Jer Noble 2011-04-14 23:22:12 PDT
Comment 2 Jer Noble 2011-04-14 23:27:51 PDT
Created attachment 89742 [details]
Comment 3 Eric Carlson 2011-04-15 07:09:15 PDT
Comment on attachment 89742 [details]

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

> Source/WebKit2/WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:119
> +    CALayer* root = rootLayer()->platformLayer();
> +    [[NSNotificationCenter defaultCenter] postNotificationName:@"NSCAViewRenderDidPauseNotification" object:nil userInfo:[NSDictionary dictionaryWithObject:root forKey:@"layer"]];
> +    [root setValue:(id)kCFBooleanTrue forKey:@"NSCAViewRenderPaused"];

Shouldn't you set the property before posting the notification?

> Source/WebKit2/WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:126
> +    CALayer* root = rootLayer()->platformLayer();
> +    [[NSNotificationCenter defaultCenter] postNotificationName:@"NSCAViewRenderDidResumeNotification" object:nil userInfo:[NSDictionary dictionaryWithObject:root forKey:@"layer"]];
> +     [root setValue:(id)kCFBooleanFalse forKey:@"NSCAViewRenderPaused"];

Comment 4 Jer Noble 2011-04-15 10:34:22 PDT
Created attachment 89806 [details]
Comment 5 Jer Noble 2011-04-15 11:07:44 PDT
Committed r83994: <http://trac.webkit.org/changeset/83994>