Closed
Bug 293586
Opened 20 years ago
Closed 20 years ago
Navigation icons change their shade of grey after time
Categories
(Core Graveyard :: GFX: Win32, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: stevee, Assigned: paper)
References
Details
(Keywords: regression)
Attachments
(2 files, 1 obsolete file)
|
32.61 KB,
image/png
|
Details | |
|
3.52 KB,
patch
|
tor
:
review+
tor
:
superreview+
shaver
:
approval1.8b2+
|
Details | Diff | Splinter Review |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050510
Firefox/1.0+
1. New profile, start firefox
2. Open some tabs: www.google.com www.neowin.net
http://www.mozilla.org/products/firefox/central.html www.slashdot.org
3. Focus the www.slashdot.org tab
4. Nip outsite for a cigarette / wait a length of time (~3 mins)
5. Return to firefox, and select all the other tabs.
Actual: Notice that any of firefox's greyed out navigation icons have changed
colour, from being a light grey to a dark grey
Expected: Navigation icons don't change their shade of grey.
Picture: http://syskin.is.dreaming.org/b0rk.png
I suspect bug 292051 caused this regression.
| Reporter | ||
Updated•20 years ago
|
Keywords: regression
Updated•20 years ago
|
Flags: blocking1.8b2?
OS: Windows 2000 → All
| Assignee | ||
Comment 1•20 years ago
|
||
Steve, can you tell me your resolution (specifically color mode.. 32 bit, 16
bit, 256 color, etc)?
Also, anyone seeing this on a Seamonkey build?
If I don't figure this out in the next day or two, I'll back out 292051 (for
b2). By first guess is ConvertDDBtoDIB is somehow converting the DDB back to a
DIB as a greyscale image.
Comment 2•20 years ago
|
||
I have 32 bit and see this
Comment 3•20 years ago
|
||
No the problem is not greyscale, the problem is in alpha channel: after some
time, the weightned pixel values suddenly get darker, and the darkness level
depends on the alpha value.
On the picture, this is especially visible wth the Forecast icons - the suns are
nicely anti-aliased, but with this bug they get a black outline.
The icons are gray because they are in disabled state, which gives them
semi-transparent look.
The funny thing is, not all pictures are always affected - for example right
now, a Up-Down autoscroller is very dark (it's semi transparent) while
Up-Down-Left-Right autoscroller is white as it should be. If I wait some more,
it'll become black too.
This might be a png-only problem - quite difficuilt to tell since only pngs have
such alpha channel.
Transparent png files from websites are also affected.
Comment 4•20 years ago
|
||
gradual degradation.
from the top to bottom is ~30 minutes
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050510
Firefox/1.0+
Matrox G200 / 32-bit color
| Reporter | ||
Comment 5•20 years ago
|
||
32bit, 1280x1024 @ 85Hz, nVidia GF4 Ti4400, Forceware 76.41
| Assignee | ||
Comment 6•20 years ago
|
||
Thanks, I can reproduce now. Only affects 8 bit alphas (PNGs)
..I hope ;)
| Assignee | ||
Comment 7•20 years ago
|
||
I have a fix for this, but I'll sleep on it before attaching the patch.
The problem is we pre-multiply the imagebits by the alpha when optimizing
(required by GDI). After 60s, we un-optimize and get back the bits (still
pre-multiplied). When the image needs drawing again, we re-optimize,
pre-multiplying the image again. This ends up in a layer effect of lowering
opacity over time.
The solution is to not pre-multiply the imagebits if the imagebits are already
pre-multiplied.
| Assignee | ||
Comment 8•20 years ago
|
||
*** Bug 293665 has been marked as a duplicate of this bug. ***
| Assignee | ||
Comment 9•20 years ago
|
||
Testcase:
1) Load any PNG with 8-bit alpha
(http://mozilla.animecity.nu/IMGTest/images/Mozilla.png for example)
2) Wait 60s (or 70s just to be sure). Don't touch mouse, move from page, etc
3) Press the Reload button (or find some other way to update the image, like
hovering another window over it, or switching tabs)
4) Image will be darker.
Repeat steps 2 and 3 and image will continually get darker
| Assignee | ||
Comment 10•20 years ago
|
||
Patch that worked last night on a very dirty tree of mine. I'm in the process
of compiling a clean tree.
Assignee: win32 → paper
Status: NEW → ASSIGNED
Comment 11•20 years ago
|
||
On that patch, did you mean to type mImagePreMultipled or mImagePreMultipl*i*ed?
| Assignee | ||
Updated•20 years ago
|
Attachment #183217 -
Flags: superreview?(tor)
Attachment #183217 -
Flags: review?(emaijala)
| Assignee | ||
Updated•20 years ago
|
Attachment #183217 -
Attachment is obsolete: true
Attachment #183217 -
Flags: superreview?(tor)
Attachment #183217 -
Flags: review?(emaijala)
| Assignee | ||
Comment 12•20 years ago
|
||
Fixed spelling error that Devin noticed.
The scary thing is that I had to have mispelled it 4 times when writing the
patch, yet I spelled it right on the bug comments
Attachment #183219 -
Flags: superreview?(tor)
Attachment #183219 -
Flags: review?(emaijala)
Attachment #183219 -
Flags: superreview?(tor)
Attachment #183219 -
Flags: superreview+
Attachment #183219 -
Flags: review?(emaijala)
Attachment #183219 -
Flags: review+
| Assignee | ||
Updated•20 years ago
|
Attachment #183219 -
Flags: approval1.8b2?
Comment 13•20 years ago
|
||
Comment on attachment 183219 [details] [diff] [review]
Don't premultiply image with alpha if it's already premultiplied
a=shaver to un-regress from a previous approval.
Attachment #183219 -
Flags: approval1.8b2? → approval1.8b2+
| Assignee | ||
Comment 14•20 years ago
|
||
Checked-in. Thanks for the help, everyone! I'll wait for reports before
resolving the bug
Checking in gfx/src/windows/nsImageWin.cpp;
/cvsroot/mozilla/gfx/src/windows/nsImageWin.cpp,v <-- nsImageWin.cpp
new revision: 3.149; previous revision: 3.148
done
Checking in gfx/src/windows/nsImageWin.h;
/cvsroot/mozilla/gfx/src/windows/nsImageWin.h,v <-- nsImageWin.h
new revision: 3.66; previous revision: 3.65
done
Comment 15•20 years ago
|
||
No more problems for me, thank you!
Comment 16•20 years ago
|
||
Oh, two minutes after I sent that it's back. It might be because I have an older
build. Will try again, but in the meantime scratch my confirmation.
Sorry for the bugspam.
Comment 17•20 years ago
|
||
AronM, is it just me or your code only changes truecolour images with alpha,
while 256-colour images are still multiplied just like before?
| Assignee | ||
Comment 18•20 years ago
|
||
(In reply to comment #17)
> AronM, is it just me or your code only changes truecolour images with alpha,
> while 256-colour images are still multiplied just like before?
You are right, but the function (CreateImageWithAlphaBits) only gets called on
images with 8 bit alphas, and we never never create an 8 bit alpha image with a
palette (256 colors). That function really needs a cleanup (on my list of TODOs
sometime)
Comment 19•20 years ago
|
||
fixed for me with latest beast build
Comment 20•20 years ago
|
||
Can anyone else confirm that this is fixed?
Comment 21•20 years ago
|
||
Yup... it's fixed since yesterday's builds. Closing.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment 22•20 years ago
|
||
(In reply to comment #21)
> Yup... it's fixed since yesterday's builds. Closing.
doesn't comment #18 imply this bug isn't completely fixed yet ?
Comment 23•20 years ago
|
||
It simply mentions a later function cleanup from what I can tell. The problem
this bug was opened for though is indeed fixed in the nightlies. Did the patch
author intend to keep this bug open until some unspecified later date that he
can cleanup the code?
| Assignee | ||
Comment 24•20 years ago
|
||
Thanks again everyone. I was only leaving the bug open until I had a few more
verifies (which it now does!). Comment #18 is indeed a cleanup bug not related
to this bug.
Updated•20 years ago
|
Flags: blocking1.8b2?
Updated•16 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•