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