Closed
Bug 376471
Opened 18 years ago
Closed 17 years ago
Make XBM decoding also write directly to Cairo image buffer
Categories
(Core :: Graphics: ImageLib, defect)
Core
Graphics: ImageLib
Tracking
()
VERIFIED
FIXED
mozilla1.9beta1
People
(Reporter: alfredkayser, Assigned: alfredkayser)
References
Details
Attachments
(3 files, 3 obsolete files)
(deleted),
application/octet-stream
|
Details | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
tor
:
review+
tor
:
superreview+
tor
:
approval1.9+
|
Details | Diff | Splinter Review |
With patch, all image decoders uses the same pattern: use the image buffer of Cairo to decode directly to.
Attachment #260576 -
Flags: review?(pavlov)
Comment 1•18 years ago
|
||
Comment on attachment 260576 [details] [diff] [review]
Write directly to Cairo image buffer
please use tabs in the makefile like everything else
Attachment #260576 -
Flags: superreview?(cbiesinger)
Attachment #260576 -
Flags: review?(pavlov)
Attachment #260576 -
Flags: review+
Comment 2•18 years ago
|
||
Comment on attachment 260576 [details] [diff] [review]
Write directly to Cairo image buffer
+ mFrame->GetImageData((PRUint8**)&mImageData, &imageLen);
I'd use C++ casts here
+ *ar++ = NS_CAIRO_PIXEL((pixel & 1)?255:0, 0, 0, 0);
I can't find a definition for NS_CAIRO_PIXEL in lxr, where is it?
please add spaces around the ? and the :
why are you counting down from numPixels rather than up?
So this patch breaks incremental rendering of XBM files?
Assignee | ||
Comment 3•18 years ago
|
||
1. C++ casts or C casts, it is just what one's preference is.
2. NS_CAIRO_PIXEL is now GFX_PACKED_PIXEL.
3. Only the loop counter goes down (which is faster)
but image decoding is still incremental, in the order that pixels come in.
4. Adding spaces for the ? / 0; but possibly I will use a different way to do this more nicely.
New patch coming up...
Comment 4•18 years ago
|
||
(In reply to comment #3)
> 3. Only the loop counter goes down (which is faster)
Why's that faster?
> but image decoding is still incremental, in the order that pixels come in.
Yes, but you don't call OnDataAvailable anymore escape at the end of decoding, right?
Comment 5•18 years ago
|
||
that "escape" should've been "except"
Assignee | ||
Comment 6•17 years ago
|
||
This patch re-enables OnDataAvailable per row.
It also fixes the NS_CAIRO_PIXEL name.
(Note, a loop counting down to zero is faster because it doesn't have to compare the loopcounter to the endvalue)
Attachment #260576 -
Attachment is obsolete: true
Attachment #276006 -
Flags: superreview?(cbiesinger)
Attachment #260576 -
Flags: superreview?(cbiesinger)
Assignee | ||
Comment 7•17 years ago
|
||
Assignee: nobody → alfredkayser
Status: NEW → ASSIGNED
Assignee | ||
Updated•17 years ago
|
Attachment #276006 -
Flags: superreview?(cbiesinger) → superreview?(tor)
Comment on attachment 276006 [details] [diff] [review]
V3: Make OnDataAvailable row-based again
>--- modules/libpr0n/decoders/xbm/Makefile.in 9 Dec 2004 19:28:23 -0000 1.7
>+++ modules/libpr0n/decoders/xbm/Makefile.in 9 Aug 2007 18:51:16 -0000
>@@ -45,15 +45,17 @@ include $(DEPTH)/config/autoconf.mk
>
> MODULE = imgxbm
> LIBRARY_NAME = imgxbm_s
> FORCE_STATIC_LIB = 1
> MODULE_NAME = nsXBMModule
> LIBXUL_LIBRARY = 1
>
> REQUIRES = xpcom \
>+ string \
> gfx \
>+ thebes \
> imglib2 \
> $(NULL)
Nit: fix spacing.
Attachment #276006 -
Flags: superreview?(tor) → superreview+
Assignee | ||
Comment 9•17 years ago
|
||
Attachment #276006 -
Attachment is obsolete: true
Attachment #278216 -
Flags: approval1.9?
Assignee | ||
Comment 10•17 years ago
|
||
This patch is needed to fix bug 367281, to get rid of the ugly SetImageData/SetAlphaData from gfxImageFrame. SetImageData/SetAlphaData don't work as expected (and could even crash) in the Cairo based Gecko 1.9, and it would be wrong to keep these methods exposed in the official Gecko 1.9 release.
Flags: blocking1.9?
Comment 11•17 years ago
|
||
this won't block the release but I will approve the patch once it gets r/sr=
Flags: blocking1.9? → blocking1.9-
Assignee | ||
Comment 12•17 years ago
|
||
This patch has already r/sr (see v1/v2). The last version addressed the comment from the SR.
Keywords: checkin-needed
Assignee | ||
Comment 13•17 years ago
|
||
Stuart, as this patch has r/sr, can you give your approval1.9?
Updated•17 years ago
|
Keywords: checkin-needed
Updated•17 years ago
|
Attachment #278216 -
Flags: approval1.9? → approval1.9+
Updated•17 years ago
|
Keywords: checkin-needed
Comment 14•17 years ago
|
||
Comment on attachment 278216 [details] [diff] [review]
V4: Fix alignment in Makefile.in
This patch is quite bitrot and refuses to apply on current trunk. Can you attach an unbitrot patch for check-in?
Assignee | ||
Comment 15•17 years ago
|
||
Attachment #278216 -
Attachment is obsolete: true
Comment 16•17 years ago
|
||
Checking in modules/libpr0n/decoders/xbm/Makefile.in;
/cvsroot/mozilla/modules/libpr0n/decoders/xbm/Makefile.in,v <-- Makefile.in
new revision: 1.9; previous revision: 1.8
done
Checking in modules/libpr0n/decoders/xbm/nsXBMDecoder.cpp;
/cvsroot/mozilla/modules/libpr0n/decoders/xbm/nsXBMDecoder.cpp,v <-- nsXBMDecoder.cpp
new revision: 1.24; previous revision: 1.23
done
Checking in modules/libpr0n/decoders/xbm/nsXBMDecoder.h;
/cvsroot/mozilla/modules/libpr0n/decoders/xbm/nsXBMDecoder.h,v <-- nsXBMDecoder.h
new revision: 1.9; previous revision: 1.8
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M9
Assignee | ||
Comment 17•17 years ago
|
||
A bit of the patch was dropped in the fixing of the bitrot in the patch.
XBM images don't display at all now.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 18•17 years ago
|
||
Attachment #283318 -
Flags: superreview?(tor)
Attachment #283318 -
Flags: review?(pavlov)
Attachment #283318 -
Flags: superreview?(tor)
Attachment #283318 -
Flags: superreview+
Attachment #283318 -
Flags: review?(pavlov)
Attachment #283318 -
Flags: review+
Updated•17 years ago
|
Attachment #283318 -
Flags: approval1.9?
Attachment #283318 -
Flags: approval1.9? → approval1.9+
Comment 19•17 years ago
|
||
Checking in modules/libpr0n/decoders/xbm/nsXBMDecoder.cpp;
/cvsroot/mozilla/modules/libpr0n/decoders/xbm/nsXBMDecoder.cpp,v <-- nsXBMDecoder.cpp
new revision: 1.25; previous revision: 1.24
done
Status: REOPENED → RESOLVED
Closed: 17 years ago → 17 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 20•17 years ago
|
||
Verifed in build Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a9pre) Gecko/2007100405 Minefield/3.0a9pre.
Thanks for the quick checkin!
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•