clipPath-advanced-01.svg is hitting D2D error, calling Mask()

NEW
Unassigned

Status

()

Core
Graphics
4 years ago
4 years ago

People

(Reporter: vlad, Unassigned)

Tracking

Trunk
x86_64
Windows 8
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

On Win64 Server 2013 (8.1-ish), the test below is hitting a d2d error.  Jeff also tells me that Mask() shouldn't be getting called, but it is.

REFTEST TEST-LOAD | file:///c:/Users/vladimir/proj/mozilla-central/layout/reftests/svg/clipPath-advanced-01.svg | 7806 / 9388 (83%)
D2D DEBUG ERROR - This operation is not compatible with the pixel format of the bitmap.

0000009c`dbc37ee8 000007fb`41702883 KERNELBASE!DebugBreak+0x2
0000009c`dbc37ef0 000007fb`4170264d D2D1Debug1+0x32883
0000009c`dbc38850 000007fb`4e8a65b6 D2D1Debug1+0x3264d
0000009c`dbc38880 000007fb`4e934438 d2d1!D2D1ConvertColorSpace+0x47e6
0000009c`dbc388b0 000007fb`4e975c41 d2d1!D2D1MakeSkewMatrix+0x8cac8
0000009c`dbc388e0 000007fb`4e6fb4bc d2d1!D2D1MakeSkewMatrix+0xce2d1
0000009c`dbc38960 000007fb`4e8b35d5 d2d1+0xb4bc
0000009c`dbc38a00 000007fb`416f22b8 d2d1!D2D1MakeSkewMatrix+0xbc65
0000009c`dbc38a60 000007fb`40fb0267 D2D1Debug1+0x222b8
0000009c`dbc38ab0 000007fb`372d93c5 gkmedias!mozilla::gfx::DrawTargetD2D::Mask+0x24b [c:\users\vladimir\proj\mozilla-central\gfx\2d\drawtargetd2d.cpp @ 994]  (the rt->FillRectangle() call)
0000009c`dbc38c60 000007fb`364e894a xul!gfxContext::Mask+0x38d [c:\users\vladimir\proj\mozilla-central\gfx\thebes\gfxcontext.cpp @ 1444]
0000009c`dbc38d70 000007fb`365017b1 xul!nsSVGClipPathFrame::ClipPaint+0x376 [c:\users\vladimir\proj\mozilla-central\layout\svg\nssvgclippathframe.cpp @ 133]
0000009c`dbc38e70 000007fb`3595635f xul!nsSVGIntegrationUtils::PaintFramesWithEffects+0x539 [c:\users\vladimir\proj\mozilla-central\layout\svg\nssvgintegrationutils.cpp @ 532]
0000009c`dbc38ff0 000007fb`358fb6f2 xul!nsDisplaySVGEffects::PaintAsLayer+0x1f [c:\users\vladimir\proj\mozilla-central\layout\base\nsdisplaylist.cpp @ 4298]
0000009c`dbc39030 000007fb`358f8248 xul!mozilla::PaintInactiveLayer+0x182 [c:\users\vladimir\proj\mozilla-central\layout\base\framelayerbuilder.cpp @ 1964]
0000009c`dbc390f0 000007fb`37348b33 xul!mozilla::FrameLayerBuilder::DrawThebesLayer+0x87c [c:\users\vladimir\proj\mozilla-central\layout\base\framelayerbuilder.cpp @ 3298]
0000009c`dbc39390 000007fb`37346893 xul!mozilla::layers::BasicThebesLayer::PaintThebes+0x30f [c:\users\vladimir\proj\mozilla-central\gfx\layers\basic\basicthebeslayer.cpp @ 129]
0000009c`dbc39680 000007fb`3734677f xul!mozilla::layers::BasicLayerManager::PaintSelfOrChildren+0xb7 [c:\users\vladimir\proj\mozilla-central\gfx\layers\basic\basiclayermanager.cpp @ 830]
0000009c`dbc39740 000007fb`3734691d xul!mozilla::layers::BasicLayerManager::PaintLayer+0x67b [c:\users\vladimir\proj\mozilla-central\gfx\layers\basic\basiclayermanager.cpp @ 1005]
0000009c`dbc39940 000007fb`3734677f xul!mozilla::layers::BasicLayerManager::PaintSelfOrChildren+0x141 [c:\users\vladimir\proj\mozilla-central\gfx\layers\basic\basiclayermanager.cpp @ 845]
Both this and bug 917356 are only seen in debug builds, because otherwise we don't turn on D2D debug warnings.  However, those are only enabled if the d2d debug runtime is installed.  I don't believe it's installed on our tinderboxes, otherwise debug builds should fail/crash in reftests on win7/win8 debug builds.
The problem here is that we're calling FillRectangle() with a brush that's created with an A8_UNORM bitmap.  We hit the SourceSurfaceD2DTarget::GetBitmap "failure" path for FORMAT_A8, but then we just create an A8 bitmap anyway and just copy into it.

We then call FillRectangle with this, which is invalid, as per http://msdn.microsoft.com/en-us/library/windows/desktop/jj835875%28v=vs.85%29.aspx .

What is the intent here?  What is that FillRectangle supposed to do with an A8 surface? Treat it as gray?
You need to log in before you can comment on or make changes to this bug.