Backed out changeset f8d2cc53a4d6 (bug 382721)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Fri, 10 Jun 2016 15:38:34 +0200
changeset 343609 b202c733a1c248dc419118872e235a8dacfdd1b5
parent 343608 66ead626b3a1dd116da7d3fe7ec914903bec69ba
child 343610 d9253b9208477f16ad5a30231f28c4f0d838fd4a
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs382721
milestone50.0a1
backs outf8d2cc53a4d653ee631eb77b565da6d2a8e8cdd5
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
Backed out changeset f8d2cc53a4d6 (bug 382721)
layout/base/BorderConsts.h
layout/base/nsCSSRenderingBorders.cpp
--- a/layout/base/BorderConsts.h
+++ b/layout/base/BorderConsts.h
@@ -17,11 +17,9 @@
 #define SIDE_BIT_LEFT (1 << NS_SIDE_LEFT)
 #define SIDE_BITS_ALL (SIDE_BIT_TOP|SIDE_BIT_RIGHT|SIDE_BIT_BOTTOM|SIDE_BIT_LEFT)
 
 #define C_TL NS_CORNER_TOP_LEFT
 #define C_TR NS_CORNER_TOP_RIGHT
 #define C_BR NS_CORNER_BOTTOM_RIGHT
 #define C_BL NS_CORNER_BOTTOM_LEFT
 
-#define BORDER_SEGMENT_COUNT_MAX 100
-
 #endif /* mozilla_BorderConsts_h_ */
--- a/layout/base/nsCSSRenderingBorders.cpp
+++ b/layout/base/nsCSSRenderingBorders.cpp
@@ -2098,29 +2098,20 @@ nsCSSBorderRenderer::DrawDottedSideSlow(
     if (to > 2) {
       to -= 2;
     } else {
       to = 0;
     }
   }
 
   RefPtr<PathBuilder> builder = mDrawTarget->CreatePathBuilder();
-  size_t segmentCount = 0;
   for (size_t i = from; i <= to; i += 2) {
-    if (segmentCount > BORDER_SEGMENT_COUNT_MAX) {
-      RefPtr<Path> path = builder->Finish();
-      mDrawTarget->Fill(path, ColorPattern(ToDeviceColor(borderColor)));
-      builder = mDrawTarget->CreatePathBuilder();
-      segmentCount = 0;
-    }
-
     Point P = (start * (count - i) + end * i) / count;
     builder->MoveTo(Point(P.x + radius, P.y));
     builder->Arc(P, radius, 0.0f, Float(2.0 * M_PI));
-    segmentCount++;
   }
   RefPtr<Path> path = builder->Finish();
   mDrawTarget->Fill(path, ColorPattern(ToDeviceColor(borderColor)));
 
   if (mergeStart == MERGE_HALF || mergeEnd == MERGE_HALF) {
     mDrawTarget->PopClip();
   }
 }
@@ -2248,30 +2239,21 @@ nsCSSBorderRenderer::DrawDottedCornerSlo
   Point C0 = GetStraightBorderPoint(sideH, aCorner, &ignored);
   Point Cn = GetStraightBorderPoint(sideV, aCorner, &ignored);
   DottedCornerFinder finder(outerBezier, innerBezier, aCorner,
                             mBorderRadii[aCorner].width,
                             mBorderRadii[aCorner].height,
                             C0, R0, Cn, Rn, mBorderCornerDimensions[aCorner]);
 
   RefPtr<PathBuilder> builder = mDrawTarget->CreatePathBuilder();
-  size_t segmentCount = 0;
   while (finder.HasMore()) {
-    if (segmentCount > BORDER_SEGMENT_COUNT_MAX) {
-      RefPtr<Path> path = builder->Finish();
-      mDrawTarget->Fill(path, ColorPattern(ToDeviceColor(borderColor)));
-      builder = mDrawTarget->CreatePathBuilder();
-      segmentCount = 0;
-    }
-
     DottedCornerFinder::Result result = finder.Next();
 
     builder->MoveTo(Point(result.C.x + result.r, result.C.y));
     builder->Arc(result.C, result.r, 0, Float(2.0 * M_PI));
-    segmentCount++;
   }
   RefPtr<Path> path = builder->Finish();
   mDrawTarget->Fill(path, ColorPattern(ToDeviceColor(borderColor)));
 }
 
 void
 nsCSSBorderRenderer::DrawDashedCornerSlow(mozilla::css::Side aSide,
                                           mozilla::css::Corner aCorner)
@@ -2292,37 +2274,28 @@ nsCSSBorderRenderer::DrawDashedCornerSlo
   Bezier innerBezier;
   GetOuterAndInnerBezier(&outerBezier, &innerBezier, aCorner);
 
   DashedCornerFinder finder(outerBezier, innerBezier,
                             borderWidthH, borderWidthV,
                             mBorderCornerDimensions[aCorner]);
 
   RefPtr<PathBuilder> builder = mDrawTarget->CreatePathBuilder();
-  size_t segmentCount = 0;
   while (finder.HasMore()) {
-    if (segmentCount > BORDER_SEGMENT_COUNT_MAX) {
-      RefPtr<Path> path = builder->Finish();
-      mDrawTarget->Fill(path, ColorPattern(ToDeviceColor(borderColor)));
-      builder = mDrawTarget->CreatePathBuilder();
-      segmentCount = 0;
-    }
-
     DashedCornerFinder::Result result = finder.Next();
 
     builder->MoveTo(result.outerSectionBezier.mPoints[0]);
     builder->BezierTo(result.outerSectionBezier.mPoints[1],
                       result.outerSectionBezier.mPoints[2],
                       result.outerSectionBezier.mPoints[3]);
     builder->LineTo(result.innerSectionBezier.mPoints[3]);
     builder->BezierTo(result.innerSectionBezier.mPoints[2],
                       result.innerSectionBezier.mPoints[1],
                       result.innerSectionBezier.mPoints[0]);
     builder->LineTo(result.outerSectionBezier.mPoints[0]);
-    segmentCount++;
   }
 
   if (outerBezier.mPoints[0].x != innerBezier.mPoints[0].x) {
     // Fill gap before the first section.
     //
     //     outnerPoint[0]
     //         |
     //         v