| OLD | NEW |
| 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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 SkPath path; | 308 SkPath path; |
| 309 path.addRRect(inner); | 309 path.addRRect(inner); |
| 310 path.setFillType(SkPath::kInverseWinding_FillType); | 310 path.setFillType(SkPath::kInverseWinding_FillType); |
| 311 | 311 |
| 312 SkPaint paint; | 312 PaintFlags paint; |
| 313 paint.setColor(color.rgb()); | 313 paint.setColor(color.rgb()); |
| 314 paint.setStyle(SkPaint::kFill_Style); | 314 paint.setStyle(PaintFlags::kFill_Style); |
| 315 paint.setAntiAlias(true); | 315 paint.setAntiAlias(true); |
| 316 context.drawPath(path, paint); | 316 context.drawPath(path, paint); |
| 317 | 317 |
| 318 break; | 318 break; |
| 319 } | 319 } |
| 320 case BackgroundBleedClipOnly: | 320 case BackgroundBleedClipOnly: |
| 321 if (outer.isRounded()) { | 321 if (outer.isRounded()) { |
| 322 // BackgroundBleedClipOnly clips the outer rrect corners for us. | 322 // BackgroundBleedClipOnly clips the outer rrect corners for us. |
| 323 FloatRoundedRect adjustedOuter = outer; | 323 FloatRoundedRect adjustedOuter = outer; |
| 324 adjustedOuter.setRadii(FloatRoundedRect::Radii()); | 324 adjustedOuter.setRadii(FloatRoundedRect::Radii()); |
| (...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1292 FloatPoint secondQuad[4]; | 1292 FloatPoint secondQuad[4]; |
| 1293 secondQuad[0] = quad[0]; | 1293 secondQuad[0] = quad[0]; |
| 1294 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); |
| 1295 secondQuad[2] = quad[2]; | 1295 secondQuad[2] = quad[2]; |
| 1296 secondQuad[3] = quad[3]; | 1296 secondQuad[3] = quad[3]; |
| 1297 clipQuad(graphicsContext, secondQuad, secondMiter == SoftMiter); | 1297 clipQuad(graphicsContext, secondQuad, secondMiter == SoftMiter); |
| 1298 } | 1298 } |
| 1299 } | 1299 } |
| 1300 | 1300 |
| 1301 } // namespace blink | 1301 } // namespace blink |
| OLD | NEW |