Canvas context mozImageSmoothingEnabled state ignored for pattern fill.

RESOLVED FIXED in Firefox 45

Status

()

defect
P1
normal
RESOLVED FIXED
8 years ago
3 years ago

People

(Reporter: carl.olsson, Assigned: mbx)

Tracking

Trunk
mozilla45
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox45 fixed)

Details

(Whiteboard: [Shumway])

Attachments

(2 attachments, 4 obsolete attachments)

(Reporter)

Description

8 years ago
Posted file pattern_bug.html
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
Build ID: 20110928134238

Steps to reproduce:

Create HTML file with canvas.
Set canvas context mozImageSmoothingEnabled = false.
Draw pattern filled primitive to context.


Actual results:

Pattern draws with bilinear filtering.


Expected results:

Pattern should draw with nearest-neighbor sampling.
Component: General → Canvas: 2D
Product: Firefox → Core
QA Contact: general → canvas.2d
(Reporter)

Comment 1

8 years ago
Testing this on my laptop with Intel graphics, under both Windows 7 and Ubuntu 11.10 this does work as expected.

The bug presents on my desktop with AMD graphics (Radeon HD 5770, Catalyst 11.9), so maybe it's an AMD specific bug.
Attachment #568938 - Attachment mime type: text/plain → text/html
This is hurting us in Shumway: Flash by default doesn't apply anti-aliasing when scaling Bitmaps. (That is, the constructor for Bitmap has an argument `smoothing` with a default value of false, and graphics.beginBitmapFill also defaults to non-smoothing. The former works in FF, the latter doesn't. Both work in Chrome.)
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 7 → All
Hardware: x86_64 → All
Whiteboard: [Shumway]
Version: 7 Branch → Trunk

Updated

6 years ago
Duplicate of this bug: 953077
Blocks: 927828
Till says this is a hard blocker for gfx fidelity, but might be easy to fix.
Priority: -- → P1
(Assignee)

Comment 5

5 years ago
Prototype implementation, will follow up will try results.
(Assignee)

Comment 6

5 years ago
Try: https://tbpl.mozilla.org/?tree=Try&rev=7d63a6133ba7
Assignee: nobody → mbebenita
(Assignee)

Updated

5 years ago
Attachment #8494856 - Attachment description: With a test case. → Take imageSmoothingEnabled into account when creating pattern fills w/ test case.
(Assignee)

Updated

5 years ago
Attachment #8494856 - Flags: review?(bjacob)
Comment on attachment 8494856 [details] [diff] [review]
Take imageSmoothingEnabled into account when creating pattern fills w/ test case.

Review of attachment 8494856 [details] [diff] [review]:
-----------------------------------------------------------------

I'm the wrong reviewer. Try Bas Schouten or Matt Woodrow.
Attachment #8494856 - Flags: review?(bjacob)
Michael, is your mozImageSmoothingEnabled patch still relevant?
Blocks: shumway-m5
No longer blocks: shumway-1.0
Flags: needinfo?(mbebenita)
(Assignee)

Comment 10

4 years ago
Yes, it should still be relevant.
Flags: needinfo?(mbebenita)

Comment 11

4 years ago
This is pretty much blocking PDF.js issue #3331, any update on when this can be fixed?

Updated

4 years ago
Flags: needinfo?(mbebenita)
(Assignee)

Updated

4 years ago
Flags: needinfo?(mbebenita)
Attachment #8494856 - Flags: review?(matt.woodrow)
Attachment #8494856 - Flags: review?(matt.woodrow) → review+
Posted patch Patch, rebased (obsolete) — Splinter Review
Attachment #8494856 - Attachment is obsolete: true
Attachment #8688158 - Flags: review+
(Assignee)

Comment 14

4 years ago
Posted patch Patch, reabased (obsolete) — Splinter Review
Patch, fixed compiler error.
Attachment #8688158 - Attachment is obsolete: true
(Assignee)

Updated

4 years ago
Attachment #8688191 - Attachment description: patch.diff → Patch, reabased
Attachment #8688191 - Flags: review+
(Assignee)

Comment 16

4 years ago
Attachment #8688191 - Attachment is obsolete: true
Attachment #8688680 - Flags: review+
(Assignee)

Updated

4 years ago
Status: NEW → ASSIGNED
Keywords: checkin-needed

Comment 20

4 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/652ea88c04a6
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45

Comment 21

4 years ago
Cool, thanks a lot!
You need to log in before you can comment on or make changes to this bug.