Closed Bug 1054510 Opened 10 years ago Closed 10 years ago

Turn on SSE for image resizing

Categories

(Core :: Graphics, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35
Tracking Status
relnote-firefox --- 35+

People

(Reporter: asobolev, Assigned: asobolev)

Details

Attachments

(1 file, 2 obsolete files)

A couple of years ago High Quality resizing (Lanczos resampling) was introduced (https://bugzilla.mozilla.org/show_bug.cgi?id=486918) to Firefox. It was done via borrowing corresponding code from Google Chrome's skia and Chrome itself. Apparently, by that time Chrome's implementation was suffering from out-of-bound errors in SIMD case (https://code.google.com/p/chromium/issues/detail?id=181072 don't let the title confuse you, it was changed), so SSE support in FF was deliberately turned off since the very beginning. And still remains off.

Apparently, currently Chrome supports SSE for all major OS, so we should be able to turn it on quite cheaply: SSE implementation of all major functions is already in the source tree and (almost) up to date.
Comment on attachment 8480711 [details] [diff] [review]
This patch turns SSE2 on for image resizing

Review of attachment 8480711 [details] [diff] [review]:
-----------------------------------------------------------------

This needs to check for SSE2 support at run time otherwise we'll get crashes on machines that don't have it.

i.e. Factory::HasSSE2()
Attachment #8480711 - Flags: review?(jmuizelaar) → review-
Attached patch Proposed fix v2 (obsolete) — Splinter Review
Attachment #8480711 - Attachment is obsolete: true
Attachment #8480872 - Attachment is obsolete: true
Attachment #8483643 - Flags: review?(jmuizelaar) → review+
Alright, everything looks good on try! Thanks so much for working on this, Artem!

Pushed:

https://hg.mozilla.org/integration/mozilla-inbound/rev/16c3207fa04c
https://hg.mozilla.org/mozilla-central/rev/16c3207fa04c
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
Looking at this again. Where did the 'int begin, int end' arguments come from? I don't see anything like that in the chrome code.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: