Open Bug 1750381 Opened 3 years ago Updated 3 years ago

DrawTargetD2D1::DrawSurface does not consider the case where the image is too large to create ID2D1Bitmap

Categories

(Core :: Graphics, defect)

defect

Tracking

()

People

(Reporter: emk, Unassigned)

References

Details

See bug 1741767 comment 17 and onwards for details.

:Bas, :bobowen, can you comment to this bug?

Flags: needinfo?(bobowencode)
Flags: needinfo?(bas)

(In reply to Sotaro Ikeda [:sotaro] from comment #1)

:Bas, :bobowen, can you comment to this bug?

I don't really have anything to add.
I don't know the reasons for the original assertion, but it was triggered by a test and found to be an existing issue.

Flags: needinfo?(bobowencode)

This is just OptimizeSourceSurface. If it fails to upload, we just return the old DataSurface and everything works as intended. This gfxCriticalError should probably not be a critical error when it's just a size issue. The assertion is really just a side-affect of the fact we fire off a gfxCriticalError so we have some stuff in the logs.

Flags: needinfo?(bas)

I'm sorry I didn't make it clear enough. The actual assertion I hit is here:
https://searchfox.org/mozilla-central/rev/aecfc48870599adb0ffc077dd11e6e2d99820d38/gfx/2d/DrawTargetD2D1.cpp#245-247

We reach this code path because bitmap is null because image->QueryInterface((ID2D1Bitmap**)... fails because OptimizeSourceSurface fallbacks to DataSurface. I quoted only the last part in bug 1741767 comment 17.

So if I read the code comment and bug 1088235 correctly, some tests will fail on Windows 7 if the image is large enough. Thoughts?

Flags: needinfo?(bas)

(In reply to Masatoshi Kimura [:emk] from comment #4)

I'm sorry I didn't make it clear enough. The actual assertion I hit is here:
https://searchfox.org/mozilla-central/rev/aecfc48870599adb0ffc077dd11e6e2d99820d38/gfx/2d/DrawTargetD2D1.cpp#245-247

We reach this code path because bitmap is null because image->QueryInterface((ID2D1Bitmap**)... fails because OptimizeSourceSurface fallbacks to DataSurface. I quoted only the last part in bug 1741767 comment 17.

So if I read the code comment and bug 1088235 correctly, some tests will fail on Windows 7 if the image is large enough. Thoughts?

So this is specifically when the CreateImageBrush path is used -and- the thing being drawn needs the alpha channel to be ignored. Not sure when that situation occurs or if that gives issue on windows versions past Windows 7 other than the assertion firing.

Flags: needinfo?(bas)
Severity: -- → S3
You need to log in before you can comment on or make changes to this bug.