Closed Bug 1368882 Opened 3 years ago Closed 2 years ago

Assertion failed: backbufferWidth >= 0 && backbufferHeight >= 0, file gfx/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp, line 165

Categories

(Core :: Graphics: WebRender, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: sotaro, Assigned: sotaro)

Details

Attachments

(1 file, 1 obsolete file)

I saw assertion failure at gfx/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp, line 165 with WebRender enabled on my laptop.
Assignee: nobody → sotaro.ikeda.g
There is a case that height of mWidget->GetClientSize() became -27 during minimizing a Window.
I confirmed that -27 was set at WM_NCCALCSIZE message handling
 https://dxr.mozilla.org/mozilla-central/source/widget/windows/nsWindow.cpp#5231
Attachment #8873363 - Flags: review?(jmuizelaar)
Maybe it would be better to fix this in ANGLE? We seem to deal with it fine when not using ANGLE.
Flags: needinfo?(sotaro.ikeda.g)
:jrmuizel, I worried about it could be hidden problem of gecko.
It seems necessary to fix this case for webrender. mWidget->GetClientSize() returns LayoutDeviceIntSize, but webrender handle it as framebuffer_size: DeviceUintSize. Then height="-27" was handled as a very big value within Webrender. Actually (128×-27) was handled as (128×4294967269) in Webrender.
   https://dxr.mozilla.org/mozilla-central/source/gfx/webrender/src/renderer.rs#1277
Flags: needinfo?(sotaro.ikeda.g)
Comment on attachment 8873363 [details] [diff] [review]
patch - Prevent ClientSize becomes minus value

Review of attachment 8873363 [details] [diff] [review]:
-----------------------------------------------------------------

::: widget/windows/nsWindow.cpp
@@ +5241,5 @@
>          clientRect->right -=
>            NSToIntRound((mHorResizeMargin - mNonClientOffset.right) * scale);
>          clientRect->bottom -=
>            NSToIntRound((mVertResizeMargin - mNonClientOffset.bottom) * scale);
>  

Please add a comment about why this needs to happen.
Attachment #8873363 - Flags: review?(jmuizelaar) → review+
Attachment #8873363 - Attachment is obsolete: true
Attachment #8876546 - Flags: review+
Pushed by sikeda@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/07b5b1e2ed4b
Prevent ClientSize becomes minus value r=jrmuizel
https://hg.mozilla.org/mozilla-central/rev/07b5b1e2ed4b
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.