Closed
Bug 980472
Opened 10 years ago
Closed 10 years ago
Make SurfaceToPackedBGRA take a DataSourceSurface to avoid unnecessary surface conversion
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: jwatt, Assigned: jwatt)
Details
Attachments
(1 file)
920 bytes,
patch
|
bas.schouten
:
review+
|
Details | Diff | Splinter Review |
Right now callers of SurfaceToPackedBGRA that happen to have a DataSourceSurface end up having GetDataSurface called on that surface by SurfaceToPackedBGRA. Since bug 943614 that involves a second, unnecessary conversion (to type DATA) for certain backends. We should have callers do the GetDataSurface call as necessary and pass a DataSourceSurface so that we're not doing an extra conversion for callers that already have a DataSourceSurface.
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8386971 -
Flags: review?(bas)
Assignee | ||
Comment 2•10 years ago
|
||
There's only one caller currently, and that already passes a DataSourceSurface. Another patch that I have that adds a second caller also does the same.
Updated•10 years ago
|
Attachment #8386971 -
Flags: review?(bas) → review+
Assignee | ||
Comment 3•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/2ac59d28974c
Comment 4•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/2ac59d28974c
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Assignee | ||
Comment 5•10 years ago
|
||
(In reply to Jonathan Watt [:jwatt] from comment #0) > Right now callers of SurfaceToPackedBGRA that happen to have a > DataSourceSurface end up having GetDataSurface called on that surface by > SurfaceToPackedBGRA. Since bug 943614 that involves a second, unnecessary > conversion (to type DATA) for certain backends. FWIW I'm told that this is wrong. The "second" call will just create a very lightweight wrapper for which GetType()==DATA, and that has virtually no overhead. That said, it's still good to have callers know that the call involves converting to a data SourceSurface (has readback overhead, potentially), so this is still not a bad change.
You need to log in
before you can comment on or make changes to this bug.
Description
•