Bug 1637112 - Don't draw border-image segments with zero slice size. r=mstange
authorNicolas Silva <nsilva@mozilla.com>
Wed, 13 May 2020 17:31:25 +0000
changeset 531489 b57a096b5ba4955abe131079820801457ee397af
parent 531488 c8e34e81ac8a1e359a64cc94ebeeb9132989a413
child 531490 67745f2dd84827d30f654d75766351ff788f5114
push id37440
push userabutkovits@mozilla.com
push dateFri, 22 May 2020 09:43:16 +0000
treeherdermozilla-central@fbf71e4d2e21 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1637112
milestone78.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1637112 - Don't draw border-image segments with zero slice size. r=mstange Differential Revision: https://phabricator.services.mozilla.com/D75119
gfx/wr/webrender/src/border.rs
--- a/gfx/wr/webrender/src/border.rs
+++ b/gfx/wr/webrender/src/border.rs
@@ -1350,17 +1350,17 @@ impl NinePatchDescriptor {
         fn add_segment(
             segments: &mut Vec<BrushSegment>,
             rect: LayoutRect,
             uv_rect: TexelRect,
             repeat_horizontal: RepeatMode,
             repeat_vertical: RepeatMode,
             extra_flags: BrushFlags,
         ) {
-            if uv_rect.uv1.x < uv_rect.uv0.x || uv_rect.uv1.y < uv_rect.uv0.y {
+            if uv_rect.uv1.x <= uv_rect.uv0.x || uv_rect.uv1.y <= uv_rect.uv0.y {
                 return;
             }
 
             // Use segment relative interpolation for all
             // instances in this primitive.
             let mut brush_flags =
                 BrushFlags::SEGMENT_RELATIVE |
                 BrushFlags::SEGMENT_TEXEL_RECT |