Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(800)

Side by Side Diff: third_party/WebKit/Source/core/paint/BoxBorderPainter.cpp

Issue 2606913002: Remove BoxBorderPainter::drawBleedAdjustedDRRect() assert (Closed)
Patch Set: relocate test Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/roundedrects/degenerate-radius-assert-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/BoxBorderPainter.h" 5 #include "core/paint/BoxBorderPainter.h"
6 6
7 #include "core/paint/BoxPainter.h" 7 #include "core/paint/BoxPainter.h"
8 #include "core/paint/ObjectPainter.h" 8 #include "core/paint/ObjectPainter.h"
9 #include "core/paint/PaintInfo.h" 9 #include "core/paint/PaintInfo.h"
10 #include "core/style/BorderEdge.h" 10 #include "core/style/BorderEdge.h"
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 BackgroundBleedAvoidance bleedAvoidance, 298 BackgroundBleedAvoidance bleedAvoidance,
299 const FloatRoundedRect& outer, 299 const FloatRoundedRect& outer,
300 const FloatRoundedRect& inner, 300 const FloatRoundedRect& inner,
301 Color color) { 301 Color color) {
302 switch (bleedAvoidance) { 302 switch (bleedAvoidance) {
303 case BackgroundBleedClipLayer: { 303 case BackgroundBleedClipLayer: {
304 // BackgroundBleedClipLayer clips the outer rrect for the whole layer. 304 // BackgroundBleedClipLayer clips the outer rrect for the whole layer.
305 // Based on this, we can avoid background bleeding by filling the 305 // Based on this, we can avoid background bleeding by filling the
306 // *outside* of inner rrect, all the way to the layer bounds (enclosing 306 // *outside* of inner rrect, all the way to the layer bounds (enclosing
307 // int rect for the clip, in device space). 307 // int rect for the clip, in device space).
308 DCHECK(outer.isRounded());
309
310 SkPath path; 308 SkPath path;
311 path.addRRect(inner); 309 path.addRRect(inner);
312 path.setFillType(SkPath::kInverseWinding_FillType); 310 path.setFillType(SkPath::kInverseWinding_FillType);
313 311
314 SkPaint paint; 312 SkPaint paint;
315 paint.setColor(color.rgb()); 313 paint.setColor(color.rgb());
316 paint.setStyle(SkPaint::kFill_Style); 314 paint.setStyle(SkPaint::kFill_Style);
317 paint.setAntiAlias(true); 315 paint.setAntiAlias(true);
318 context.drawPath(path, paint); 316 context.drawPath(path, paint);
319 317
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
1294 FloatPoint secondQuad[4]; 1292 FloatPoint secondQuad[4];
1295 secondQuad[0] = quad[0]; 1293 secondQuad[0] = quad[0];
1296 secondQuad[1] = FloatPoint(quad[0].x() - r1 * cx, quad[0].y() - r1 * cy); 1294 secondQuad[1] = FloatPoint(quad[0].x() - r1 * cx, quad[0].y() - r1 * cy);
1297 secondQuad[2] = quad[2]; 1295 secondQuad[2] = quad[2];
1298 secondQuad[3] = quad[3]; 1296 secondQuad[3] = quad[3];
1299 clipQuad(graphicsContext, secondQuad, secondMiter == SoftMiter); 1297 clipQuad(graphicsContext, secondQuad, secondMiter == SoftMiter);
1300 } 1298 }
1301 } 1299 }
1302 1300
1303 } // namespace blink 1301 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/roundedrects/degenerate-radius-assert-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698