Closed Bug 703231 Opened 13 years ago Closed 11 years ago

[Mac] High quality down sampling causes scan lines while decoding images

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME
mozilla11

People

(Reporter: BenWa, Assigned: BenWa)

References

()

Details

Attachments

(1 file, 2 obsolete files)

      No description provided.
Attached patch patch (obsolete) — Splinter Review
Assignee: nobody → bgirard
Status: NEW → ASSIGNED
Attachment #575135 - Flags: review?(joe)
Comment on attachment 575135 [details] [diff] [review]
patch

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

::: image/src/Decoder.cpp
@@ +190,5 @@
> +#ifdef XP_MACOSX
> +    // Bug 703231
> +    // Because of high quality down sampling on mac we show scan lines while decoding.
> +    // Bypass this problem by redrawing the border.
> +    mInvalidRect = nsIntRect(mInvalidRect.x-1, mInvalidRect.y-1, mInvalidRect.width+2, mInvalidRect.height+2);

Use .Inflate(1) instead, and test what ends up happening if we invalidate (-1, -1) to (width, height).
Attachment #575135 - Flags: review?(joe) → review+
Attached patch patch v2 (obsolete) — Splinter Review
Non trivial change, re-requesting review.
Attachment #575135 - Attachment is obsolete: true
Attachment #575144 - Flags: review?(joe)
Comment on attachment 575144 [details] [diff] [review]
patch v2

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

::: image/src/Decoder.cpp
@@ +198,5 @@
> +    mImage.GetHeight(&height);
> +    nsIntRect mImageBound(0, 0, width, height);
> +
> +    mInvalidRect.Inflate(1);
> +    mInvalidRect = mInvalidRect.Union(mImageBound);

Don't you want to intersect here?
Attachment #575144 - Flags: review?(joe) → review-
Attached patch patch v3Splinter Review
Attachment #575381 - Flags: review?
Attachment #575381 - Flags: review? → review?(joe)
Comment on attachment 575381 [details] [diff] [review]
patch v3

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

It'd be handy to have a reftest here. Might be a little tricky, but worthwhile.
Attachment #575381 - Flags: review?(joe) → review+
Do we have any dupes of this bug? If we don't I find this concerning.

Do you have any ideas how I can capture this in the reftest? The current behavior is timing dependent. Have we written similar reftests in the past?
You'll have to write an HTTP reftest, similar to the one in layout/reftests/backgrounds/delay-image-response.sjs, but which sends only part of the image, delays a little bit, and then sends the rest.
Attachment #575144 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/a31b251053fb
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Flags: in-testsuite?
OS: Mac OS X → All
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
Version: unspecified → Trunk
I'm still seeing this with the current Nightly 11.0a1 (2011-12-04) when opening the URL from bug 705224.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I have noticed it too. Should we be more aggressive with our repainting area. Do we know what the bound should be?
We need to have one screen-space pixel be redrawn. So if you can get the inverse transform, then use it to transform 1 unit height into image space, you can use that value instead of just 1 pixel.
I don't see this anymore.
Status: REOPENED → RESOLVED
Closed: 13 years ago11 years ago
Resolution: --- → WORKSFORME
I have the same problem in Firefox 29.0 under Kubuntu 14.04 (fresh install).
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: