Canvas doesn't handle a transparency with a radial gradient fill with HWA enabled

RESOLVED DUPLICATE of bug 1164912

Status

()

Core
Graphics: Layers
RESOLVED DUPLICATE of bug 1164912
2 years ago
2 years ago

People

(Reporter: Roger, Unassigned)

Tracking

39 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: DUPEME)

Attachments

(4 attachments)

(Reporter)

Description

2 years ago
Created attachment 8647532 [details]
linear.pdf

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
Build ID: 20150806001005

Steps to reproduce:

I am creating pdfs using javascript. I created a linear gradient with a transparency and then a radial gradient with a transparency. The two pdfs are at these links below. The radial doesn't do the transparency. If I use Adobe Acrobat, it shows, but not in the Firefox reader. Is there something I can change to make it work, or is it a Firefox bug?

http://www.rff.com/poudrepaddlers/linear.pdf
http://www.rff.com/poudrepaddlers/radial.pdf

Cheers,

Roger Faaborg
There must be some reason why the radial code doesn't use the alpha transparency, but I can't see the problem. Can anyone more familiar with pdf files see the problem?


Actual results:

No transparency shows on radial.pdf.


Expected results:

Radial.pdf should show transparency as it does with The Adobe reader.

Updated

2 years ago
Component: Untriaged → PDF Viewer
Product: Core → Firefox
Summary: The Firefox PDF reader doesn't handle a transparency with a radial gradient fill → PDF Viewer doesn't handle a transparency with a radial gradient fill

Comment 1

2 years ago
Created attachment 8647834 [details]
radial.pdf
Created attachment 8648398 [details]
bug1194255_radial.png

It appears that this isn't actually a PDF.js bug, but rather related to HWA (hardware acceleration) being enabled; see the attached image.

Tested using: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0 ID:20150814030208 CSet: 4e883591bb5dff021c108d3e30198a99547eed1e.

Updated

2 years ago
Component: PDF Viewer → Graphics
Product: Firefox → Core
Summary: PDF Viewer doesn't handle a transparency with a radial gradient fill → PDF Viewer doesn't handle a transparency with a radial gradient fill with HWA enabled

Updated

2 years ago
Component: Graphics → Graphics: Layers
Created attachment 8648405 [details]
bug1194255_radial.html

I've extracted the canvas drawing operations into a standalone test-case, which clearly demonstrates that this is a *not* a bug in the PDF viewer, but rather a bug with HWA canvas rendering.

Comment 4

2 years ago
Probably old bug, it doesn't work i FF8.
Summary: PDF Viewer doesn't handle a transparency with a radial gradient fill with HWA enabled → Canvas doesn't handle a transparency with a radial gradient fill with HWA enabled
Whiteboard: DUPEME
(Reporter)

Comment 5

2 years ago
My computer and display don't allow me to turn off Hardware Acceleration so I can't test it without Hardware Acceleration. I will try to find another computer. I used to program Windows graphics programs and sometimes ran into problems with hardware acceleration. It is sad that I can't seem to get away from such problems. 

But if I use the Adobe reader on the same computer, the radial gradient transparency works. Doesn't adobe also have to use the same hardware acceleration?

Cheers,
Roger

Comment 6

2 years ago
You can disable HWA directly in about:config:
gfx.direct2d.disabled=false
layers.acceleration.disabled=false
then restart FF.
This is most likely a duplicate of bug 1164912.

Comment 8

2 years ago
Indeed, confirmed by mozreg:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=97012a02db93&tochange=518a79e90444
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1164912
You need to log in before you can comment on or make changes to this bug.