Closed
Bug 413933
Opened 17 years ago
Closed 17 years ago
APNGs flash while loading
Categories
(Core :: Graphics: ImageLib, defect, P2)
Tracking
()
VERIFIED
FIXED
mozilla1.9beta4
People
(Reporter: pavlov, Assigned: alfredkayser)
References
()
Details
Attachments
(1 file)
(deleted),
patch
|
pavlov
:
review+
|
Details | Diff | Splinter Review |
I'm very disturbed to find animated 3d dolphins on the internet. I'm more disturbed that they flash while loading. Would be great if we can fix this somehow.
Alfred: Any chance you could take a look at this?
Flags: blocking1.9?
Comment 1•17 years ago
|
||
The animations there are all quite large (The dolphin is ~1MB), could be that we're displaying frames that are only partially downloaded/decoded?
Yeah, that's almost certainly what's happening -- but I was pretty sure we'd only display fully decoded frames when an animation is involved. It looks like we're getting to a partially-decoded frame and then holding on it while it loads, then going on to the next one, etc.
Assignee | ||
Comment 3•17 years ago
|
||
Probably quite simple. In the GIF decoder we made sure that the ImageUpdated (and OnDataAvailable) are only called on the first frame (as only the first frame is allowed to be displayed incrementally).
So, in the PNG decoder the same needs to happen, about here:
http://lxr.mozilla.org/seamonkey/source/modules/libpr0n/decoders/png/nsPNGDecoder.cpp
787 nsIntRect r(0, row_num, width, 1);
788 nsCOMPtr<nsIImage> img(do_GetInterface(decoder->mFrame));
789 img->ImageUpdated(nsnull, nsImageUpdateFlags_kBitsChanged, &r);
790 decoder->mObserver->OnDataAvailable(nsnull, decoder->mFrame, &r);
Updated•17 years ago
|
Version: unspecified → Trunk
Updated•17 years ago
|
Flags: blocking1.9? → blocking1.9+
Priority: -- → P2
Comment 6•17 years ago
|
||
Old URL ( http://animatedpng.com/index.php/samples/3d-dolphin/ ) doesn't seem to work now.
Setting a new URL: http://animatedpng.com/index.php/samples/3d-apngs/
Assignee | ||
Updated•17 years ago
|
Assignee: nobody → alfredkayser
Assignee | ||
Comment 7•17 years ago
|
||
Notes:
* Replaced the apngFlags with a PRPackedBool
* Added 'EndImageFrame' to consolidate the end frame code into one place
* passing png's frame_num to EndFrameDecode doesn't work (as it may be one ahead), so replaced with GetNumFrames()
* Removed the use of GetPreferredAlphaChannelFormat (it always returns RGB_A8).
* Removed the ibpr/bpr code (allocating an frame to just get bpr) (as it was not used).
* Replaced decoder->mFrame->GetFormat() with decoder->format (as it is the same).
* Only do incremental image updates for the first frame, as for other frames it will cause fickering...
Attachment #300863 -
Flags: review?(pavlov)
Assignee | ||
Updated•17 years ago
|
Status: NEW → ASSIGNED
Reporter | ||
Comment 8•17 years ago
|
||
Comment on attachment 300863 [details] [diff] [review]
V1: Fix the flickering...
save the animated dolphins!
Attachment #300863 -
Flags: review?(pavlov) → review+
Updated•17 years ago
|
Keywords: checkin-needed
Assignee | ||
Updated•17 years ago
|
Attachment #300863 -
Flags: approval1.9?
Comment 9•17 years ago
|
||
Comment on attachment 300863 [details] [diff] [review]
V1: Fix the flickering...
This is a blocker. You don't need approval.
Attachment #300863 -
Flags: approval1.9?
Assignee | ||
Comment 10•17 years ago
|
||
Sorry, I overlooked the 'blocker' flag.
Comment 11•17 years ago
|
||
Checking in modules/libpr0n/decoders/png/nsPNGDecoder.cpp;
/cvsroot/mozilla/modules/libpr0n/decoders/png/nsPNGDecoder.cpp,v <-- nsPNGDecoder.cpp
new revision: 1.80; previous revision: 1.79
done
Checking in modules/libpr0n/decoders/png/nsPNGDecoder.h;
/cvsroot/mozilla/modules/libpr0n/decoders/png/nsPNGDecoder.h,v <-- nsPNGDecoder.h
new revision: 1.21; previous revision: 1.20
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9beta4
Comment 12•17 years ago
|
||
Verified fix on Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9b4pre) Gecko/2008022704 Minefield/3.0b4pre. Flashing in URL testcase is gone.
Status: RESOLVED → VERIFIED
Comment 13•17 years ago
|
||
Verified on minefield 20080226 on Gutsy. Looks great.
You need to log in
before you can comment on or make changes to this bug.
Description
•