Closed Bug 337424 Opened 17 years ago Closed 16 years ago

Unloaded part of image drawn as black when top of image is above visible region

Categories

(Core :: Graphics, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bugz, Unassigned)

References

Details

Attachments

(1 file, 2 obsolete files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060509 Firefox/3.0a1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060509 Firefox/3.0a1

Fix from bug 326672 and bug 336236 draws only decoded parts of image but it doesn't take into account that image in some cases will not be draw from (0,0) position. This can be spoted when image bigger then visible region is loaded and page is scrolled down.

Reproducible: Always
Attached patch v1 (obsolete) — Splinter Review
This patch fixes this issue by decreasing clip size by region not visible on screen.
Attachment #221579 - Flags: review?(vladimir)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 221579 [details] [diff] [review]
v1

Hmm. I /think/ this is ok; thanks for the patch!  Something is niggling at me that there may need to be some scaling involved with SX/SY, but maybe not.

r=me in any case, we can fix the scaled case if it's wrong.
Attachment #221579 - Flags: review?(vladimir) → review+
Attached patch v2 (obsolete) — Splinter Review
You have right, aS{X,Y} should be scaled as well, anyway i taken deeper look at that code and simplified this code by removing source cliping entirely.

I am not 100% sure that removing memset is correct, but didn't see what can require it now, when cliping is corrected.
Attachment #221579 - Attachment is obsolete: true
Attachment #221687 - Flags: review?(vladimir)
Attached patch v3Splinter Review
This version correctly handles images which decodes from bottom to top, it fixes bug 339204.
Attachment #221687 - Attachment is obsolete: true
Attachment #223352 - Flags: review?(vladimir)
Attachment #221687 - Flags: review?(vladimir)
Blocks: 339204
Comment on attachment 223352 [details] [diff] [review]
v3

Looks good; this should also fix the crash people are seeing due to the clip, but I still need to track that down (because thta crash shouldn't be there!)
Attachment #223352 - Flags: review?(vladimir) → review+
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.