Bug 80369

Summary: [BlackBerry] Don't suspend accel comp when backgrounding a page
Product: WebKit Reporter: Jakob Petsovits <jpetsovits>
Component: WebKit BlackBerryAssignee: Jakob Petsovits <jpetsovits>
Severity: Normal CC: anilsson, manyoso, tonikitoo, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: Other   
URL: http://www.webkit.org/blog-files/3d-transforms/poster-circle.html
Description Flags
Patch: Don't suspend accel comp when backgrounding a page none

Description Jakob Petsovits 2012-03-05 19:52:46 PST
When WebPage::notifyPageBackground() is called, it calls WebPagePrivate::suspendRootLayerCommit() in turn, which not only turns off root layer commits but also frees resources for accelerated compositing. Those resources are not being recreated until WebPagePrivate::resumeRootLayerCommit() is called.

Completely suspending root layer commits is wrong, because just because the page has been backgrounded doesn't mean it's not visible anymore, or doesn't have to be redrawn in some cases. Rotation being the prime example when we have to redraw everything. With the current code, a page that's not active is able to redraw backingstore-rendered content, but not composited content. That's something we should fix.
Comment 1 Jakob Petsovits 2012-03-05 20:02:59 PST
Created attachment 130272 [details]
Patch: Don't suspend accel comp when backgrounding a page

This is the straightforward solution, which just avoids suspending the compositor. It results in accelerated contents being rendered (as in, 'at all'), but I've seen occasional misrenderings for bottom-fixed elements on rotation as well as incorrect rendering in other areas. Not sure if they are a different issue or if this patch is not as correct as it should be. I checked and animations don't show up on screen, but I didn't yet check whether they still occur behind the scenes. In any case, it's an improvement over the current state which is just plain incorrect.
Comment 2 WebKit Review Bot 2012-03-06 09:10:12 PST
Comment on attachment 130272 [details]
Patch: Don't suspend accel comp when backgrounding a page

Clearing flags on attachment: 130272

Committed r109926: <http://trac.webkit.org/changeset/109926>
Comment 3 WebKit Review Bot 2012-03-06 09:10:16 PST
All reviewed patches have been landed.  Closing bug.