Closed
Bug 958008
Opened 11 years ago
Closed 11 years ago
Avoid copying images on Android/Gonk when there's nothing to optimize
Categories
(Core :: Graphics, defect)
Tracking
()
People
(Reporter: mwu, Assigned: mwu)
References
Details
(Keywords: perf)
Attachments
(1 file, 1 obsolete file)
1.35 KB,
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
On Android/Gonk, offscreen surfaces are just gfxImageSurfaces, so there's no point in copying an image to a new gfxImageSurface if there's no format conversion.
Attachment #8357708 -
Flags: review?(vladimir)
Assignee | ||
Comment 1•11 years ago
|
||
A cleaner version without ifdefs. I can do the same cleanup for windows.
Attachment #8357708 -
Attachment is obsolete: true
Attachment #8357708 -
Flags: review?(vladimir)
Attachment #8359044 -
Flags: review?(vladimir)
Comment 2•11 years ago
|
||
Comment on attachment 8359044 [details] [diff] [review]
Avoid unnecessary image copy on Android/Gonk, v2
Why not put that straight into gfxPlatform::OptimizeImage?
Assignee | ||
Comment 3•11 years ago
|
||
That's what the first version of my patch did, but it only did it for Android/Gonk. Seems better to put the platform specific fastpaths into the platform specific implementations.
Other platforms generally seem to have platform specific offscreen surfaces so they probably don't want this.
Comment 4•11 years ago
|
||
Your patch seems to be a general if-already-optimal-don't-optimize, so why not allow that code everywhere?
Assignee | ||
Comment 5•11 years ago
|
||
Even when the format of the image is optimal, how that image is stored might not be optimal. For example, on OSX, we always convert our gfxImageSurface to a gfxQuartzImageSurface. Platforms other than gonk/android seem to always have a more optimal native surface to use rather than gfxImageSurface. I have no idea how much those surfaces improve things.
Comment 6•11 years ago
|
||
Comment on attachment 8359044 [details] [diff] [review]
Avoid unnecessary image copy on Android/Gonk, v2
Review of attachment 8359044 [details] [diff] [review]:
-----------------------------------------------------------------
This looks good to me.
Attachment #8359044 -
Flags: review?(vladimir) → review+
Assignee | ||
Comment 7•11 years ago
|
||
Comment 8•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Comment 10•11 years ago
|
||
The request was made to add this to 1.3. We can also consider the specific branches for the uplift.
blocking-b2g: --- → 1.3?
Comment 11•11 years ago
|
||
How do people feel about only taking this for tarako vs taking it on all devices for 1.3? Other than being concerned with risk (but that's not up to us if mwu and jrmuziel are cool with it), people in triage didn't have much of an opinion either way.
Assignee | ||
Comment 12•11 years ago
|
||
AFAIK, the risk is pretty low, and it's in a code path shared with Fennec so we get extra testing here for free.
Comment 14•11 years ago
|
||
We've been keen on any kind of memory usage reduction, so this should play nicely. I imagine this only applies to the peak memory usage, rather than overall, but either way, it should help.
Comment 15•11 years ago
|
||
(In reply to Andrew Overholt [:overholt] from comment #13)
> What could possibly go wrong? :)
In case it's not clear, this was meant as a joke and came out of a semi-hilarious-at-the-time discussion we had during triage :)
Comment 16•11 years ago
|
||
status-b2g-v1.3:
--- → fixed
status-b2g-v1.4:
--- → fixed
status-firefox27:
--- → wontfix
status-firefox28:
--- → fixed
status-firefox29:
--- → fixed
Updated•11 years ago
|
status-b2g-v1.3T:
--- → fixed
Comment 17•11 years ago
|
||
Per https://bugzilla.mozilla.org/show_bug.cgi?id=960224#c24 - this needs to be backed out. This caused a 50ms startup performance regression in the Music app.
Flagging checkin-needed for a backout on all branches.
Keywords: checkin-needed
Comment 18•11 years ago
|
||
Backed out:
https://hg.mozilla.org/integration/mozilla-inbound/rev/659f28f869bc
https://hg.mozilla.org/releases/mozilla-aurora/rev/62b1dd99bf38
https://hg.mozilla.org/releases/mozilla-b2g28_v1_3/rev/3cedba4f54d2
Status: RESOLVED → REOPENED
status-firefox30:
--- → affected
status-firefox31:
--- → affected
Keywords: checkin-needed
Resolution: FIXED → ---
Target Milestone: mozilla29 → ---
Comment 19•11 years ago
|
||
Unblocking this due the performance regression risk.
Comment 20•11 years ago
|
||
(In reply to Jason Smith [:jsmith] from comment #19)
> Unblocking this due the performance regression risk.
This wasn't backed out from mozilla-release or mozilla-beta, so those status flags were correct (albeit pointless).
Assignee | ||
Comment 21•11 years ago
|
||
In theory, we should check this back in because this did not actually cause a 50ms regression in the music app. In practice, bug 980035 makes us to not go through this path anymore, so there's no point in checking this code back in.
Status: REOPENED → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Target Milestone: --- → 1.4 S4 (28mar)
You need to log in
before you can comment on or make changes to this bug.
Description
•