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


(Core :: Graphics: WebRender, enhancement)

Not set



Tracking Status
firefox55 --- fixed


(Reporter: sotaro, Assigned: sotaro)



(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
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.
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
Prevent ClientSize becomes minus value r=jrmuizel
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.