Bug 1409736 - Initialize the new clip member introduced in WR PR 1867. r=jrmuizel
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 23 Oct 2017 09:48:45 -0400
changeset 387635 c826c4b1da2c1999b71eff33d21c030c52f2ca36
parent 387634 0f5a9d7f918e967240213a9f85a423bd4486452f
child 387636 b8fcf3e74e0327ede687f04829ad6eaafaef5d81
push id32732
push userarchaeopteryx@coole-files.de
push dateMon, 23 Oct 2017 21:48:58 +0000
treeherdermozilla-central@ebde6678a101 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1409736
milestone58.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 1409736 - Initialize the new clip member introduced in WR PR 1867. r=jrmuizel MozReview-Commit-ID: JRzYT4WNoJi
gfx/webrender_bindings/WebRenderTypes.h
layout/painting/DisplayItemClip.cpp
--- a/gfx/webrender_bindings/WebRenderTypes.h
+++ b/gfx/webrender_bindings/WebRenderTypes.h
@@ -320,16 +320,17 @@ static inline wr::LayoutSize ToLayoutSiz
 static inline wr::ComplexClipRegion ToComplexClipRegion(const RoundedRect& rect)
 {
   wr::ComplexClipRegion ret;
   ret.rect               = ToLayoutRect(rect.rect);
   ret.radii.top_left     = ToLayoutSize(LayoutDeviceSize::FromUnknownSize(rect.corners.radii[mozilla::eCornerTopLeft]));
   ret.radii.top_right    = ToLayoutSize(LayoutDeviceSize::FromUnknownSize(rect.corners.radii[mozilla::eCornerTopRight]));
   ret.radii.bottom_left  = ToLayoutSize(LayoutDeviceSize::FromUnknownSize(rect.corners.radii[mozilla::eCornerBottomLeft]));
   ret.radii.bottom_right = ToLayoutSize(LayoutDeviceSize::FromUnknownSize(rect.corners.radii[mozilla::eCornerBottomRight]));
+  ret.mode = wr::ClipMode::Clip;
   return ret;
 }
 
 static inline wr::LayoutSize ToLayoutSize(const mozilla::LayoutDeviceIntSize& size)
 {
   return ToLayoutSize(LayoutDeviceSize(size));
 }
 
--- a/layout/painting/DisplayItemClip.cpp
+++ b/layout/painting/DisplayItemClip.cpp
@@ -485,12 +485,13 @@ DisplayItemClip::ToComplexClipRegions(in
     region->rect = aSc.ToRelativeLayoutRect(LayoutDeviceRect::FromAppUnits(
         mRoundedClipRects[i].mRect, aAppUnitsPerDevPixel));
     const nscoord* radii = mRoundedClipRects[i].mRadii;
     region->radii = wr::ToBorderRadius(
         LayoutDeviceSize::FromAppUnits(nsSize(radii[eCornerTopLeftX], radii[eCornerTopLeftY]), aAppUnitsPerDevPixel),
         LayoutDeviceSize::FromAppUnits(nsSize(radii[eCornerTopRightX], radii[eCornerTopRightY]), aAppUnitsPerDevPixel),
         LayoutDeviceSize::FromAppUnits(nsSize(radii[eCornerBottomLeftX], radii[eCornerBottomLeftY]), aAppUnitsPerDevPixel),
         LayoutDeviceSize::FromAppUnits(nsSize(radii[eCornerBottomRightX], radii[eCornerBottomRightY]), aAppUnitsPerDevPixel));
+    region->mode = wr::ClipMode::Clip;
   }
 }
 
 } // namespace mozilla