Closed Bug 1347147 Opened 4 years ago Closed 4 years ago

createjs.BlurFilter defect when AzureCanvasBackend are direct2d


(Core :: Canvas: 2D, defect, P1)

54 Branch



Tracking Status
firefox-esr45 --- unaffected
firefox52 --- unaffected
firefox-esr52 --- unaffected
firefox53 --- unaffected
firefox54 + fixed
firefox55 + fixed


(Reporter: devguider, Assigned: lsalzman)



(Keywords: regression, testcase, Whiteboard: [gfx-noted])


(2 files, 1 obsolete file)

Attached file ff54bug.rar
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0
Build ID: 20170314004020

Steps to reproduce:

Test the submitted demo.

Actual results:

The blurred element is being stretched and position out of place on blur effect.

Expected results:

The blurred element should preserve it's properties, only the blurred effect can be applied.
Why is it not the expected effect? How to reproduce the expected effect?
Flags: needinfo?(devguider)
Keywords: testcase
Product: Firefox → Core
Summary: html 5 createjs blur defect → createjs.BlurFilter defect
The problem is valid only for ff54 in all other browsers work fine without change the x position.

The expected effect image can't be change positions only blur effect can be applied.
I see it is different cases in same version with different profile.

Normal if:
AzureCanvasBackend	skia
AzureContentBackend	skia
AzureFallbackCanvasBackend	cairo

Offset if:
AzureCanvasBackend	direct2d 1.1
AzureContentBackend	direct2d 1.1
AzureFallbackCanvasBackend	skia

Regression window:
Blocks: 1334749
Has Regression Range: --- → yes
Has STR: --- → yes
Component: Untriaged → Canvas: 2D
Ever confirmed: true
Flags: needinfo?(devguider)
Keywords: regression
OS: Unspecified → Windows 10
Hardware: Unspecified → x86
Summary: createjs.BlurFilter defect → createjs.BlurFilter defect while are direct2d
Hmm.  I have no idea why this would even be backend-dependent.  Lee, do you have any idea?
Flags: needinfo?(lsalzman)
Tracking 54/55+ to investigate this regression.
YF, do you see this on 55 too, or just on 54?
Flags: needinfo?(yfdyh000)
(In reply to Boris Zbarsky [:bz] (still a bit busy) (if a patch has no decent message, automatic r-) from comment #6)
> YF, do you see this on 55 too, or just on 54?

55 too. Version 55.0a1, Build ID 20170314030215.
Flags: needinfo?(yfdyh000)
CopySurface is supposed to operate in device-space. Unfortunately, DrawTargetD2D1::GetImageForSurface always reads from the user-space transform (as per

This causes problems when DrawTargetD2D1::CopySurface attempts to clear the transform on the device context ( The partial upload inside GetImageForSurface is basically trying to clip the partial upload in user-space, which is wrong.

We need to ignore this transform for this to properly clip the uploaded surface. This patch does that, which was simpler that the alternatives.
Assignee: nobody → lsalzman
Flags: needinfo?(lsalzman)
Attachment #8847368 - Flags: review?(mchang)
Attachment #8847368 - Flags: review?(mchang) → review+
Summary: createjs.BlurFilter defect while are direct2d → createjs.BlurFilter defect when AzureCanvasBackend are direct2d
Added a simplified reftest to make sure this doesn't happen in the future.
Attachment #8847368 - Attachment is obsolete: true
Attachment #8847389 - Flags: review+
Pushed by
fix DrawTargetD2D1::GetImageForSurface to support uploads in device-space. r=mchang
OS: Windows 10 → Windows
Priority: -- → P1
Hardware: x86 → All
Whiteboard: [gfx-noted]
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Comment on attachment 8847389 [details] [diff] [review]
fix DrawTargetD2D1::GetImageForSurface to support uploads in device-space. r=mchang

Approval Request Comment
[Feature/Bug causing the regression]: bug 1334749
[User impact if declined]: Canvas2D putImageData will not be positioned correctly on Windows. 
[Is this code covered by automated tests?]: yes, added a new test for this
[Has the fix been verified in Nightly?]: yes
[Needs manual test from QE? If yes, steps to reproduce]: no 
[List of other uplifts needed for the feature/fix]: just this
[Is the change risky?]:  no
[Why is the change risky/not risky?]: Just a small change to ensure that the draw target's transformation matrix should not be applied in places it shouldn't have been. Fixes user's testcase and has added reftest to verify nothing broken and everything works.
[String changes made/needed]: none
Attachment #8847389 - Flags: approval-mozilla-aurora?
Comment on attachment 8847389 [details] [diff] [review]
fix DrawTargetD2D1::GetImageForSurface to support uploads in device-space. r=mchang

Fix a regression and include a test. Aurora54+.
Attachment #8847389 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.