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

Side by Side Diff: Source/core/paint/BoxBorderPainter.h

Issue 1167293004: [SP] Always anti-alias borders (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/TestExpectations ('k') | Source/core/paint/BoxBorderPainter.cpp » ('j') | 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 #ifndef BoxBorderPainter_h 5 #ifndef BoxBorderPainter_h
6 #define BoxBorderPainter_h 6 #define BoxBorderPainter_h
7 7
8 #include "core/layout/LayoutBoxModelObject.h" 8 #include "core/layout/LayoutBoxModelObject.h"
9 #include "core/style/BorderEdge.h" 9 #include "core/style/BorderEdge.h"
10 #include "platform/geometry/FloatRoundedRect.h" 10 #include "platform/geometry/FloatRoundedRect.h"
(...skipping 10 matching lines...) Expand all
21 class BoxBorderPainter { 21 class BoxBorderPainter {
22 STACK_ALLOCATED(); 22 STACK_ALLOCATED();
23 public: 23 public:
24 BoxBorderPainter(const LayoutRect& borderRect, const ComputedStyle&, const I ntRect& clipRect, 24 BoxBorderPainter(const LayoutRect& borderRect, const ComputedStyle&, const I ntRect& clipRect,
25 BackgroundBleedAvoidance, bool includeLogicalLeftEdge, bool includeLogic alRightEdge); 25 BackgroundBleedAvoidance, bool includeLogicalLeftEdge, bool includeLogic alRightEdge);
26 26
27 void paintBorder(const PaintInfo&, const LayoutRect& borderRect) const; 27 void paintBorder(const PaintInfo&, const LayoutRect& borderRect) const;
28 28
29 private: 29 private:
30 struct ComplexBorderInfo; 30 struct ComplexBorderInfo;
31 enum MitreType { 31 enum MiterType {
chrishtr 2015/06/09 16:30:52 American English FTW!
32 NoMitre, 32 NoMiter,
33 SoftMitre, // Anti-aliased 33 SoftMiter, // Anti-aliased
34 HardMitre, // Not anti-aliased 34 HardMiter, // Not anti-aliased
35 }; 35 };
36 36
37 BorderEdgeFlags paintOpacityGroup(GraphicsContext*, const ComplexBorderInfo& , unsigned index, 37 BorderEdgeFlags paintOpacityGroup(GraphicsContext*, const ComplexBorderInfo& , unsigned index,
38 float accumulatedOpacity) const; 38 float accumulatedOpacity) const;
39 void paintSide(GraphicsContext*, const ComplexBorderInfo&, BoxSide, unsigned alpha, BorderEdgeFlags) const; 39 void paintSide(GraphicsContext*, const ComplexBorderInfo&, BoxSide, unsigned alpha, BorderEdgeFlags) const;
40 void paintOneBorderSide(GraphicsContext*, const FloatRect& sideRect, BoxSide , BoxSide adjacentSide1, 40 void paintOneBorderSide(GraphicsContext*, const FloatRect& sideRect, BoxSide , BoxSide adjacentSide1,
41 BoxSide adjacentSide2, const Path*, bool antialias, Color, BorderEdgeFla gs) const; 41 BoxSide adjacentSide2, const Path*, bool antialias, Color, BorderEdgeFla gs) const;
42 bool paintBorderFastPath(GraphicsContext*, const LayoutRect& borderRect) con st; 42 bool paintBorderFastPath(GraphicsContext*, const LayoutRect& borderRect) con st;
43 void drawDoubleBorder(GraphicsContext*, const LayoutRect& borderRect) const; 43 void drawDoubleBorder(GraphicsContext*, const LayoutRect& borderRect) const;
44 44
45 void drawBoxSideFromPath(GraphicsContext*, const LayoutRect&, const Path&, f loat thickness, 45 void drawBoxSideFromPath(GraphicsContext*, const LayoutRect&, const Path&, f loat thickness,
46 float drawThickness, BoxSide, Color, EBorderStyle) const; 46 float drawThickness, BoxSide, Color, EBorderStyle) const;
47 void clipBorderSidePolygon(GraphicsContext*, BoxSide, MitreType mitre1, Mitr eType mitre2) const; 47 void clipBorderSidePolygon(GraphicsContext*, BoxSide, MiterType miter1, Mite rType miter2) const;
48 void clipBorderSideForComplexInnerPath(GraphicsContext*, BoxSide) const; 48 void clipBorderSideForComplexInnerPath(GraphicsContext*, BoxSide) const;
49 49
50 MitreType computeMitre(BoxSide, BoxSide adjacentSide, BorderEdgeFlags, bool antialias) const; 50 MiterType computeMiter(BoxSide, BoxSide adjacentSide, BorderEdgeFlags, bool antialias) const;
51 static bool mitresRequireClipping(MitreType mitre1, MitreType mitre2, EBorde rStyle, bool antialias); 51 static bool mitersRequireClipping(MiterType miter1, MiterType miter2, EBorde rStyle, bool antialias);
52 52
53 const BorderEdge& firstEdge() const 53 const BorderEdge& firstEdge() const
54 { 54 {
55 ASSERT(m_visibleEdgeSet); 55 ASSERT(m_visibleEdgeSet);
56 return m_edges[m_firstVisibleEdge]; 56 return m_edges[m_firstVisibleEdge];
57 } 57 }
58 58
59 // const inputs 59 // const inputs
60 const ComputedStyle& m_style; 60 const ComputedStyle& m_style;
61 const BackgroundBleedAvoidance m_bleedAvoidance; 61 const BackgroundBleedAvoidance m_bleedAvoidance;
(...skipping 12 matching lines...) Expand all
74 bool m_isUniformStyle; 74 bool m_isUniformStyle;
75 bool m_isUniformWidth; 75 bool m_isUniformWidth;
76 bool m_isUniformColor; 76 bool m_isUniformColor;
77 bool m_isRounded; 77 bool m_isRounded;
78 bool m_hasAlpha; 78 bool m_hasAlpha;
79 }; 79 };
80 80
81 } // namespace blink 81 } // namespace blink
82 82
83 #endif 83 #endif
OLDNEW
« 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