1.74 KB, text/plain
1.69 KB, patch
|Details | Diff | Splinter Review|
1.78 KB, text/plain
Created attachment 711208 [details] Oprofile results for SwapRAndBComponents Using oprofile, I did some profiling of the Crystal Skull app on FFOS. I found that it spends around 10% of the time in libxul.so, and 40% of that time in the function SwapRAndBComponents, which converts images between RGBA and BGRA.
We don't actually care about this -- readback is death to begin with, and we're going to be skipping the readback entirely with bug 837591 and/or bug 716859. (However, if we do need to fix this specific issue, we should just not do SwapRAndBComponents at all -- we can do the swap for free in the final fragment shader in the compositor, we just have to tell it what the RB order is.)
I'll attach some patches and you can still decide whether to take them or not. They are already finished, so it's not much of a difference for me.
Ah ok -- if you already have patches done, no reason not to take 'em :)
Created attachment 711229 [details] [diff] [review] BGRA test in GetOptimalReadFormats Actually a patch for bug 743918, which gets fixed as a side effect. I thought it might be better to keep this a separate change.
Attachment #711229 - Flags: review?(vladimir)
Created attachment 711232 [details] [diff] [review] Use BGRA for reading textures if available This change increase the frame rate of the Crystal Skull app from ~8 to ~10 fps, because the call to SwapRandBComponents is not necessary any more.
Created attachment 711234 [details] [diff] [review] Improve component swapping when reading texture in RGBA format This patch increase the performance in the (very) slow path. As a nice side effect, the code is now endian-agnostic. I think the original code only worked in little-endian machines.
Attachment #711234 - Flags: review?(vladimir)
Created attachment 711235 [details] Oprofile results for patched SwapRAndBComponents These are the oprofile results for the patched implementation of SwapRAndBComponents. It now takes only ~30% of the time in libxul; in stead of ~40%.
Comment on attachment 711234 [details] [diff] [review] Improve component swapping when reading texture in RGBA format Gah, apologies for forgetting about this. The SwapRAndBComponents stuff is good, no reason not to take it. The others don't apply any more as the code went away..
Attachment #711234 - Flags: review?(vladimir) → review+
Attachment #711229 - Flags: review?(vladimir) → review-
Attachment #711229 - Attachment is obsolete: true
Thanks! And sorry for the delay here. I've been busy with other stuff.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.