-
Notifications
You must be signed in to change notification settings - Fork 6k
Clamp RRect radii when deflating, assert on negative radii
#36062
Conversation
8c3c2db to
fe04609
Compare
RRect radii when deflating, assert on negative radii
fe09c32 to
cce13a5
Compare
|
Gold has detected about 1 new digest(s) on patchset 8. |
cce13a5 to
20da08e
Compare
| "//flutter/lib/ui/isolate_name_server.dart", | ||
| "//flutter/lib/ui/key.dart", | ||
| "//flutter/lib/ui/lerp.dart", | ||
| "//flutter/lib/ui/math.dart", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was added in #36106, but I forgot to add it here. To be honest, I have no idea why it didn't blow up the framework build, but it didn't. Anyhow, adding it in now so that we can finish moving clampDouble into dart:ui.
goderbauer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| assert(blRadiusX != null), | ||
| assert(blRadiusY != null); | ||
| assert(blRadiusY != null), | ||
| assert(tlRadiusX >= 0), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe mention this in the docs for the public constructors that feed into this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point.
d97b7ee to
e5529e5
Compare
e5529e5 to
c52f063
Compare
* Add `Radius.clamp` and `Radius.clampValues` (#36106) * Build CanvasKit in the Flutter Engine (#32510) * Clamp `RRect` radii when deflating, assert on negative radii (#36062) Co-authored-by: Greg Spencer <[email protected]> Co-authored-by: Harry Terkelsen <[email protected]>
Description
Adding clamping to
RRectradii when deflating, and asserting that supplied radii aren't negative, since having negative radii was causing some rendering artifacts.This is the right place to do it, rather than higher in the stack, (e.g. as was necessary in flutter/flutter#106849).
Also, added a reference to
math.dartin thedart_ui.gnifile that was missed in #36106Related PRs:
Related Issues
Tests