Open Bug 1323932 Opened 3 years ago Updated 2 years ago

Very long (feels like a hang) time spend in calling canvas' isPointInStroke Windows with Direct2D canvas backend

Categories

(Core :: Canvas: 2D, defect, P5, critical)

36 Branch
All
Windows
defect

Tracking

()

Tracking Status
firefox-esr52 --- wontfix
firefox53 --- wontfix
firefox56 --- wontfix
firefox57 --- wontfix
firefox58 --- wontfix
firefox59 --- ?

People

(Reporter: tsmith, Unassigned)

References

(Blocks 2 open bugs)

Details

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

Attachments

(1 file)

Attached file hang.html
The attached test case triggers a hang on Windows builds (Direct2D). It does complete after a few minutes but the same test case on Linux completes instantaneously. The main problem here is that I seem to hit this(I think/hope it is the same) hang about every 5 iterations making it very difficult to fuzz.
Whiteboard: [fuzzblocker] → [fuzzblocker][gfx-noted]
This has been hanging since support for resetTransform landed in bug 1099148. Would be nice to understand why our D2D code paths hit this and others don't.
Blocks: 1099148
Has Regression Range: --- → yes
Version: Trunk → 36 Branch
I can reproduce though it seems it's isPointInStroke that takes the long time.  resetTransform is just an alias to setTransform(1,0,0,1,0,0) which was available before bug 1099148.  isPointInStroke internally calls Path::StrokeContainsPoint which is specific to each backend, which explains why it may take a long time (D2D) or not (Skia).
In the D2D scenario, we just call ID2D1Geometry::StrokeContainsPoint, so don't have a lot of control over speed.  Without resetting the transform, the point in the example that we're searching for can be rejected quickly (probably just based on the bounding box), but once we set the transform to identity, the arc in question is very large/long and D2D chokes on it.  Not sure there is much we can do here...
Priority: P3 → P5
Summary: Hang in canvas on Windows → Very long (feels like a hang) time spend in calling canvas' isPointInStroke Windows with Direct2D canvas backend
You need to log in before you can comment on or make changes to this bug.