Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // 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
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef BoxBorderPainter_h | |
| 6 #define BoxBorderPainter_h | |
| 7 | |
| 8 #include "core/layout/LayoutBoxModelObject.h" | |
| 9 #include "platform/heap/Heap.h" | |
| 10 | |
| 11 namespace blink { | |
| 12 | |
| 13 class ComputedStyle; | |
| 14 class LayoutBox; | |
| 15 class LayoutRect; | |
| 16 struct PaintInfo; | |
| 17 | |
| 18 // TODO(fmalita): this class will evolve into a stateful painter (merged w/ BoxB orderInfo), with no | |
| 19 // static methods. | |
| 20 class BoxBorderPainter { | |
| 21 STACK_ALLOCATED(); | |
| 22 public: | |
| 23 void paintBorder(LayoutBoxModelObject&, const PaintInfo&, const LayoutRect&, const ComputedStyle&, | |
| 24 BackgroundBleedAvoidance, bool includeLogicalLeftEdge, bool includeLogic alRightEdge) const; | |
| 25 | |
| 26 private: | |
| 27 static void paintTranslucentBorderSides(GraphicsContext*, const ComputedStyl e&, const FloatRoundedRect& outerBorder, const FloatRoundedRect& innerBorder, | |
| 28 const BorderEdge[], BorderEdgeFlags, BackgroundBleedAvoidance, bool incl udeLogicalLeftEdge, 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
| |
| 29 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
| |
| 30 const FloatRect& sideRect, BoxSide, BoxSide adjacentSide1, BoxSide adjac entSide2, const BorderEdge[], | |
| 31 const Path*, BackgroundBleedAvoidance, bool includeLogicalLeftEdge, bool includeLogicalRightEdge, bool antialias, const Color* overrideColor = 0); | |
| 32 static void paintBorderSides(GraphicsContext*, const ComputedStyle&, const F loatRoundedRect& 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
| |
| 33 const BorderEdge[], BorderEdgeFlags, BackgroundBleedAvoidance, bool incl udeLogicalLeftEdge, | |
| 34 bool includeLogicalRightEdge, bool antialias = false, const Color* overr ideColor = 0); | |
| 35 static void drawBoxSideFromPath(GraphicsContext*, const LayoutRect&, const P ath&, const BorderEdge[], | |
| 36 float thickness, float drawThickness, BoxSide, const ComputedStyle&, | |
| 37 Color, EBorderStyle, BackgroundBleedAvoidance, bool includeLogicalLeftEd ge, bool includeLogicalRightEdge); | |
| 38 static void clipBorderSidePolygon(GraphicsContext*, const FloatRoundedRect& outerBorder, const FloatRoundedRect& innerBorder, | |
| 39 BoxSide, bool firstEdgeMatches, bool secondEdgeMatches); | |
| 40 static void clipBorderSideForComplexInnerPath(GraphicsContext*, const FloatR oundedRect&, const FloatRoundedRect&, BoxSide, const BorderEdge[]); | |
| 41 }; | |
| 42 | |
| 43 } // namespace blink | |
| 44 | |
| 45 #endif | |
| OLD | NEW |