Bug 119589 - [BlackBerry] Don't release the canvas Drawable, flush it directly instead
Summary: [BlackBerry] Don't release the canvas Drawable, flush it directly instead
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit BlackBerry (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jakob Petsovits
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-08 12:26 PDT by Jakob Petsovits
Modified: 2013-08-09 08:27 PDT (History)
6 users (show)

See Also:


Attachments
Patch (8.41 KB, patch)
2013-08-08 12:46 PDT, Jakob Petsovits
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jakob Petsovits 2013-08-08 12:26:34 PDT
The current compositing code uses releaseBufferDrawable() to flush painted ImageBuffer contents, but then proceeds to use that released Drawable for further painting without ever locking a new one.

In an implementation that actually releases the Drawable rather than keeping it around and just flushing it, this will wreak havoc as bad as black screens or crashes.

As a solution that doesn't require the ImageBuffer object to swap out its m_canvas member for a new Drawable, we can access the PlatformGraphicsContext::flush() method directly to achieve the same effect as was previously intended by calling releaseBufferDrawable(). All it needs is letting the canvas layer know about the Drawable so it can call that flush() method by itself.

Related: BlackBerry JIRA 444857, https://jira.bbqnx.net/browse/BRWSR-12531
Comment 1 Jakob Petsovits 2013-08-08 12:46:14 PDT
Created attachment 208362 [details]
Patch
Comment 2 WebKit Commit Bot 2013-08-09 08:27:15 PDT
Comment on attachment 208362 [details]
Patch

Clearing flags on attachment: 208362

Committed r153895: <http://trac.webkit.org/changeset/153895>
Comment 3 WebKit Commit Bot 2013-08-09 08:27:17 PDT
All reviewed patches have been landed.  Closing bug.