Bug 1640858 Comment 22 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Yeah, it looks like [this code](https://searchfox.org/mozilla-central/rev/f27594d62e7f1d57626889255ce6a3071d67209f/gfx/webrender_bindings/RenderCompositorEGL.cpp#129) tries to clamp the region to the framebuffer bounds at the same time as inverting the coordinate space, but does so incorrectly.

If webrender produces a dirty rect with a negative y value, and and height greater than the framebuffer height, then that code first clamps that height to the framebuffer size, then uses the clamped height to calculate the dirty rect's bottom. Basically we need to change `height` to rect.size.height`
Yeah, it looks like [this code](https://searchfox.org/mozilla-central/rev/f27594d62e7f1d57626889255ce6a3071d67209f/gfx/webrender_bindings/RenderCompositorEGL.cpp#129) tries to clamp the region to the framebuffer bounds at the same time as inverting the coordinate space, but does so incorrectly.

If webrender produces a dirty rect with a negative y value, and height greater than the framebuffer height, then that code first clamps that height to the framebuffer size, then uses the clamped height to calculate the dirty rect's bottom. Basically we need to change `height` to rect.size.height`
Yeah, it looks like [this code](https://searchfox.org/mozilla-central/rev/f27594d62e7f1d57626889255ce6a3071d67209f/gfx/webrender_bindings/RenderCompositorEGL.cpp#129) tries to clamp the region to the framebuffer bounds at the same time as inverting the coordinate space, but does so incorrectly.

If webrender produces a dirty rect with a negative y value, and height greater than the framebuffer height, then that code first clamps that height to the framebuffer size, then uses the *clamped* height to calculate the dirty rect's bottom. Basically we need to change `height` to `rect.size.height`

Back to Bug 1640858 Comment 22