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

Unified Diff: Source/core/paint/BoxBorderPainter.h

Issue 1171583003: Rework BoxBorderPainter's mitre clipping logic (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: expectations Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/TestExpectations ('k') | Source/core/paint/BoxBorderPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/BoxBorderPainter.h
diff --git a/Source/core/paint/BoxBorderPainter.h b/Source/core/paint/BoxBorderPainter.h
index 9586e07ea48fdd3daa396f4b3c048f375601dc37..b167b46fd482984dbf3236e5bcd280f9be468845 100644
--- a/Source/core/paint/BoxBorderPainter.h
+++ b/Source/core/paint/BoxBorderPainter.h
@@ -28,6 +28,11 @@ public:
private:
struct ComplexBorderInfo;
+ enum MitreType {
fs 2015/06/08 21:06:31 Maybe MiterType (etc.) so them Americans understan
+ NoMitre,
+ SoftMitre, // Anti-aliased
+ HardMitre, // Not anti-aliased
+ };
BorderEdgeFlags paintOpacityGroup(GraphicsContext*, const ComplexBorderInfo&, unsigned index,
float accumulatedOpacity) const;
@@ -39,10 +44,12 @@ private:
void drawBoxSideFromPath(GraphicsContext*, const LayoutRect&, const Path&, float thickness,
float drawThickness, BoxSide, Color, EBorderStyle) const;
- void clipBorderSidePolygon(GraphicsContext*, BoxSide, bool firstEdgeMatches,
- bool secondEdgeMatches) const;
+ void clipBorderSidePolygon(GraphicsContext*, BoxSide, MitreType mitre1, MitreType mitre2) const;
void clipBorderSideForComplexInnerPath(GraphicsContext*, BoxSide) const;
+ MitreType computeMitre(BoxSide, BoxSide adjacentSide, BorderEdgeFlags, bool antialias) const;
+ static bool mitresRequireClipping(MitreType mitre1, MitreType mitre2, EBorderStyle, bool antialias);
+
const BorderEdge& firstEdge() const
{
ASSERT(m_visibleEdgeSet);
« no previous file with comments | « LayoutTests/TestExpectations ('k') | Source/core/paint/BoxBorderPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698