Bug 96684 - [BlackBerry] Support copying image data in WebOverlay
Summary: [BlackBerry] Support copying image data in WebOverlay
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit BlackBerry (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jakob Petsovits
Depends on:
Reported: 2012-09-13 12:43 PDT by Jakob Petsovits
Modified: 2012-09-17 07:57 PDT (History)
6 users (show)

See Also:

Patch (11.81 KB, patch)
2012-09-13 12:49 PDT, Jakob Petsovits
no flags Details | Formatted Diff | Diff
Patch (11.86 KB, patch)
2012-09-13 14:22 PDT, Jakob Petsovits
no flags Details | Formatted Diff | Diff
Patch (11.16 KB, patch)
2012-09-14 11:10 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 2012-09-13 12:43:58 PDT
The publicly exposed WebOverlay class provides a method setContentsToImage() to assign a pointer to pixel data, which is later used to provide texture data for the underlying compositing layer. This works well for static images that stay in memory and never change, but not so well for images with changing contents or where the image data is being reassigned from different image sources that are not constantly kept around in memory.

Due to the delayed upload and delayed fetching of EGLImage data by the GPU, we shouldn't assume the caller to know how long the image should be retained. Instead, we should offer another method of setting image data that takes ownership of the pixel data.

This patch adds an option to setContentsToImage() that copies the passed pixel data and doesn't destroy it until both the texture is destroyed and the image contents are changed. Using this method, the caller can withdraw the passed pixel array right after the setContentsToImage() call without consequences.
Comment 1 Jakob Petsovits 2012-09-13 12:49:56 PDT
Created attachment 163940 [details]
Comment 2 Jakob Petsovits 2012-09-13 14:22:45 PDT
Created attachment 163965 [details]

Not sure why the first attempt above didn't apply. Git had no rebase issues (except for ChangeLog, which is irrelevant here) but the bot uses regular patch, so let's try again with the rebased version.
Comment 3 Jakob Petsovits 2012-09-14 11:10:02 PDT
Created attachment 164194 [details]

There, that should do it. Shoot for the sky, bots!
Comment 4 Rob Buis 2012-09-17 07:41:13 PDT
Comment on attachment 164194 [details]

Looks good.
Comment 5 WebKit Review Bot 2012-09-17 07:57:13 PDT
Comment on attachment 164194 [details]

Clearing flags on attachment: 164194

Committed r128755: <http://trac.webkit.org/changeset/128755>
Comment 6 WebKit Review Bot 2012-09-17 07:57:17 PDT
All reviewed patches have been landed.  Closing bug.