Chromium Code Reviews| Index: Source/core/paint/BoxBorderPainter.h |
| diff --git a/Source/core/paint/BoxBorderPainter.h b/Source/core/paint/BoxBorderPainter.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2b9e435773095780babb38e35d8be6ae68295cc5 |
| --- /dev/null |
| +++ b/Source/core/paint/BoxBorderPainter.h |
| @@ -0,0 +1,45 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
|
pdr.
2015/06/02 00:59:56
Nit: Not your fault but line lengths are all over
f(malita)
2015/06/02 01:12:53
Agreed, will do. I tend to wrap at ~100 whatever I
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef BoxBorderPainter_h |
| +#define BoxBorderPainter_h |
| + |
| +#include "core/layout/LayoutBoxModelObject.h" |
| +#include "platform/heap/Heap.h" |
| + |
| +namespace blink { |
| + |
| +class ComputedStyle; |
| +class LayoutBox; |
| +class LayoutRect; |
| +struct PaintInfo; |
| + |
| +// TODO(fmalita): this class will evolve into a stateful painter (merged w/ BoxBorderInfo), with no |
| +// static methods. |
| +class BoxBorderPainter { |
| + STACK_ALLOCATED(); |
| +public: |
| + void paintBorder(LayoutBoxModelObject&, const PaintInfo&, const LayoutRect&, const ComputedStyle&, |
| + BackgroundBleedAvoidance, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const; |
| + |
| +private: |
| + static void paintTranslucentBorderSides(GraphicsContext*, const ComputedStyle&, const FloatRoundedRect& outerBorder, const FloatRoundedRect& innerBorder, |
| + const BorderEdge[], BorderEdgeFlags, BackgroundBleedAvoidance, bool includeLogicalLeftEdge, bool includeLogicalRightEdge, bool antialias = false); |
|
pdr.
2015/06/02 00:59:56
The optional antialias value doesn't seem to be us
f(malita)
2015/06/02 01:12:53
it's computed in paintBorder() & passed through to
pdr.
2015/06/02 01:17:33
I just mean the optional part: "bool antialias = f
|
| + static void paintOneBorderSide(GraphicsContext*, const ComputedStyle&, const FloatRoundedRect& outerBorder, const FloatRoundedRect& innerBorder, |
|
pdr.
2015/06/02 00:59:56
The optional overrideColor value doesn't seem to b
f(malita)
2015/06/02 01:12:53
computed in paintTranslucentBorderSides() & used f
|
| + const FloatRect& sideRect, BoxSide, BoxSide adjacentSide1, BoxSide adjacentSide2, const BorderEdge[], |
| + const Path*, BackgroundBleedAvoidance, bool includeLogicalLeftEdge, bool includeLogicalRightEdge, bool antialias, const Color* overrideColor = 0); |
| + static void paintBorderSides(GraphicsContext*, const ComputedStyle&, const FloatRoundedRect& outerBorder, const FloatRoundedRect& innerBorder, |
|
pdr.
2015/06/02 00:59:56
The optional antialias value doesn't seem to be us
f(malita)
2015/06/02 01:12:53
ah, if only that was true... my sleep for the last
|
| + const BorderEdge[], BorderEdgeFlags, BackgroundBleedAvoidance, bool includeLogicalLeftEdge, |
| + bool includeLogicalRightEdge, bool antialias = false, const Color* overrideColor = 0); |
| + static void drawBoxSideFromPath(GraphicsContext*, const LayoutRect&, const Path&, const BorderEdge[], |
| + float thickness, float drawThickness, BoxSide, const ComputedStyle&, |
| + Color, EBorderStyle, BackgroundBleedAvoidance, bool includeLogicalLeftEdge, bool includeLogicalRightEdge); |
| + static void clipBorderSidePolygon(GraphicsContext*, const FloatRoundedRect& outerBorder, const FloatRoundedRect& innerBorder, |
| + BoxSide, bool firstEdgeMatches, bool secondEdgeMatches); |
| + static void clipBorderSideForComplexInnerPath(GraphicsContext*, const FloatRoundedRect&, const FloatRoundedRect&, BoxSide, const BorderEdge[]); |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif |