Closed Bug 605057 Opened 9 years ago Closed 9 years ago
Utility function to convert a surface into an image surface
First patch takes the existing function from gfxQuartzImageSurface and makes it available for all gfxASurfaces. We should add follow-up patches for other supported surface types as we need them.
Attachment #483884 - Flags: review?(roc)
Comment on attachment 483884 [details] [diff] [review] Add interface Expand the comment to say that this will not perform a copy, it will only wrap an image surface around pixel data that's already available in memory.
Attachment #483884 - Flags: review?(roc) → review+
I'd also call this "GetAsImageSurface"
That was my original thought. I went with this name to avoid breaking bcompat for gfxQuartzImageSurface. Worth going through and changing all instances of this?
Should only be a few, no? But either way, just seems clearer. The awkward thing (and I'm to blame for this) is that for win32, it's easier to create the image surface and then wrap it with a win32 surface, whereas for the Quartz case it's easier to create the quartz surface and then get an image surface pointing to the data. I guess thebes hides all that.
Renamed to GetAsImageSurface, updated all usage of the old function. Implemented it for gfxImageSurface.
Comment on attachment 484558 [details] [diff] [review] Add interface v2 This is OK. We can implement GetAsImageSurface for (some) gfxQuartzSurfaces too, but I guess we can do that when it matters.
Attachment #484558 - Flags: review?(roc) → review+
Patches for that (originally by joe) are attached to bug 575521
We need this for perf improvements.
blocking2.0: ? → betaN+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.