Closed Bug 1088235 Opened 10 years ago Closed 10 years ago

/tests/content/media/test/test_streams_element_capture.html failing when enabling D2D 1.1 canvas

Categories

(Core :: Graphics, defect)

x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: bas.schouten, Assigned: bas.schouten)

References

Details

Attachments

(1 file)

/tests/content/media/test/test_streams_element_capture.html is failing on our testing machines when enabling D2D 1.1 canvas. It does not seem to fail for me locally.
In the test, we create a canvas, draw the last frame of the video to it, then use canvas.getImageData on pixel 0,0 and test for alpha == 255. This works for all the movies except for gizmo.mp4. In gizmo.mp4 case, canvas.getImageData of 0,0 pixel once the movie ends is 78,51,32,0 so the test fails.
I imagine an issue with SourceSurfaceD2D1...
Or, now guessing DrawTargetD2D1:OptimizeSourceSurface...
So it appears on Windows 7, Direct2D has a bug where it will not properly ignore the alpha channel of a source surface when drawing using a brush. When using DrawBitmap however, this is fine. This breaks the test because the decoder will give us a B8G8R8X8 image with the alpha channel set to 0x00. As a work-around we can use DrawBitmap. This should cover all of our usecases since only canvas currently uses DrawSurface. I've added an assert to remind us if we try using it elsewhere with 'opaque' images.
Assignee: nobody → bas
Status: NEW → ASSIGNED
Attachment #8519156 - Flags: review?(jmuizelaar)
Attachment #8519156 - Flags: review?(jmuizelaar) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: