Bug 41195 - [chromium] Drag images look wrong
Summary: [chromium] Drag images look wrong
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-24 23:27 PDT by Nico Weber
Modified: 2010-06-25 00:20 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nico Weber 2010-06-24 23:27:58 PDT
DragImageChromiumSkia contains this:

            *pixel = SkPreMultiplyARGB(SkColorGetA(*pixel) * fraction,
                                       SkColorGetR(*pixel),
                                       SkColorGetG(*pixel),
                                       SkColorGetB(*pixel));

That's wrong: *pixel already contains premultiplied rgb, and calling SkPreMultiplyARGB() again multiplies rgb by the new alpha again. Instead, SkPackARGB should be called.
Comment 1 Nico Weber 2010-06-25 00:20:04 PDT
On second thought, this is only wrong if SkColorGetA(*pixel) is not 255 or 0, which it usually is in practice.

(it's also wrong if the channel layout of SkColor and SkPMColor doesn't match.)

Fixing without depending on private headers of skia doesn't seem possible, and since it doesn't seem so bad, i'll close this as wontfix for now.