Last Comment Bug 627626 - Transparent images are not rendered correctly under Win 7
: Transparent images are not rendered correctly under Win 7
Status: RESOLVED INCOMPLETE
: regression
Product: Core
Classification: Components
Component: Canvas: 2D (show other bugs)
: unspecified
: x86_64 Windows 7
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-20 21:45 PST by Regis Le Brettevillois
Modified: 2015-10-27 10:13 PDT (History)
10 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
.x+


Attachments
A screentshot showing the problem (10.92 KB, image/png)
2011-01-20 21:58 PST, Regis Le Brettevillois
no flags Details
The image used to reproduce the problem. (2.80 KB, image/png)
2011-01-20 21:59 PST, Regis Le Brettevillois
no flags Details
FastDial for FF4.0 with my current fixes (127.51 KB, application/x-xpinstall)
2011-01-20 22:46 PST, Regis Le Brettevillois
no flags Details

Description Regis Le Brettevillois 2011-01-20 21:45:41 PST
User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b9) Gecko/20100101 Firefox/4.0b9
Build Identifier:             Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b9) Gecko/20100101 Firefox/4.0b9

I'm currently trying to fix the FastDial extension for FF 4.
One of the bugs is related to the transparent thumbnails logos that are not anymore transparent.

The code that creates the thumbnail is:

  var context = canvas.getContext("2d");
  context.clearRect(0, 0, canvas.width, canvas.height);
  context.save();
  context.scale(canvas.width / width, canvas.height / height);
  context.drawWindow(wnd, 0, 0, width, height, "rgba(0,0,0,0)");
  context.restore();

First, I thought this was related to changes in the API, but the different feedbacks I got from other users is that the problem is only visible on Win 7 (either 32 or 64)

Reproducible: Always

Steps to Reproduce:
1. Install FastDial in FF4.0 under Win 7
2. Set a blue backgroup in the FastDial settings
3. Open a FastDial tab 
4. Create a bookmark to www.mozilla.org
5. Open the bookmark's properties and set a logo that has a transparent background (I've made a totally transparent png)
6. See the result
Actual Results:  
The rendered thumbnail is totally opaque (white).

Expected Results:  
The rendered thumbnail should be transparent and we should see the background.
Comment 1 Regis Le Brettevillois 2011-01-20 21:58:52 PST
Created attachment 505687 [details]
A screentshot showing the problem

One the left a full transparent logo (with a simple line) rendered in the thumnail.
Comment 2 Regis Le Brettevillois 2011-01-20 21:59:57 PST
Created attachment 505688 [details]
The image used to reproduce the problem.
Comment 3 Regis Le Brettevillois 2011-01-20 22:01:30 PST
The image directly loaded in FF4 as a document is correctly transparent.
Comment 4 Regis Le Brettevillois 2011-01-20 22:46:08 PST
Created attachment 505709 [details]
FastDial for FF4.0 with my current fixes
Comment 5 Jorge Villalobos [:jorgev] 2011-01-21 13:05:36 PST
Can you please provide a minimal testcase for this? Perhaps an HTML page with the canvas.
Comment 6 chiaroscuro 2011-01-23 04:35:21 PST
Same problem with white background also seen with Fast Dial running in Mac with OS X 10.6.5
Comment 7 Joe Drew (not getting mail) 2011-01-24 11:55:42 PST
Does this happen if you disable Hardware Acceleration? Go to Preferences > Advanced and tick the checkbox.
Comment 8 Regis Le Brettevillois 2011-01-24 14:39:10 PST
It happens whatever is the status of Hardware Acceleration (at least on Windows 7)

I try to build a test case based on the one provided for https://bugzilla.mozilla.org/show_bug.cgi?id=469170.
But I'm not very familiar with what is done in FastDial, the logo (transparent PNG) is first used as the content of a document that is part of the "overlay.xul". Next it used as the input for the drawWindow API.
I've difficulties to emulate this outside of the extension's context. Any help would be appreciated.
Comment 9 Joe Drew (not getting mail) 2011-01-25 17:11:01 PST
I don't know that we'll have time to fix this in time for 4.0.0, but we should look at it for a followup. If a patch appeared, I would approve it happily!
Comment 10 Robert O'Callahan (:roc) (email my personal email if necessary) 2011-01-29 01:19:38 PST
I think we'd fix this for 4.0 if we had a reduced testcase.
Comment 11 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2015-10-22 14:51:37 PDT
Closing this as incomplete. Please reopen and provide a reduced testcase if this still reproduces in a current Firefox version.

Note You need to log in before you can comment on or make changes to this bug.