| 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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 const unsigned edgeAlpha = edge.color.alpha(); | 459 const unsigned edgeAlpha = edge.color.alpha(); |
| 460 | 460 |
| 461 DCHECK_GT(edgeAlpha, 0u); | 461 DCHECK_GT(edgeAlpha, 0u); |
| 462 DCHECK_GE(edgeAlpha, currentAlpha); | 462 DCHECK_GE(edgeAlpha, currentAlpha); |
| 463 if (edgeAlpha != currentAlpha) { | 463 if (edgeAlpha != currentAlpha) { |
| 464 opacityGroups.append(OpacityGroup(edgeAlpha)); | 464 opacityGroups.append(OpacityGroup(edgeAlpha)); |
| 465 currentAlpha = edgeAlpha; | 465 currentAlpha = edgeAlpha; |
| 466 } | 466 } |
| 467 | 467 |
| 468 DCHECK(!opacityGroups.isEmpty()); | 468 DCHECK(!opacityGroups.isEmpty()); |
| 469 OpacityGroup& currentGroup = opacityGroups.last(); | 469 OpacityGroup& currentGroup = opacityGroups.back(); |
| 470 currentGroup.sides.append(side); | 470 currentGroup.sides.append(side); |
| 471 currentGroup.edgeFlags |= edgeFlagForSide(side); | 471 currentGroup.edgeFlags |= edgeFlagForSide(side); |
| 472 } | 472 } |
| 473 | 473 |
| 474 DCHECK(!opacityGroups.isEmpty()); | 474 DCHECK(!opacityGroups.isEmpty()); |
| 475 } | 475 } |
| 476 }; | 476 }; |
| 477 | 477 |
| 478 void BoxBorderPainter::drawDoubleBorder(GraphicsContext& context, | 478 void BoxBorderPainter::drawDoubleBorder(GraphicsContext& context, |
| 479 const LayoutRect& borderRect) const { | 479 const LayoutRect& borderRect) const { |
| (...skipping 814 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 |