| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 BoxPainter_h | 5 #ifndef BoxPainter_h |
| 6 #define BoxPainter_h | 6 #define BoxPainter_h |
| 7 | 7 |
| 8 #include "core/layout/LayoutBoxModelObject.h" | 8 #include "core/layout/LayoutBoxModelObject.h" |
| 9 #include "core/paint/ObjectPainter.h" | 9 #include "core/paint/ObjectPainter.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 class BackgroundImageGeometry; | 13 class BackgroundImageGeometry; |
| 14 class FloatRoundedRect; | 14 class FloatRoundedRect; |
| 15 class LayoutPoint; | 15 class LayoutPoint; |
| 16 struct PaintInfo; | 16 struct PaintInfo; |
| 17 class RenderBox; | 17 class LayoutBox; |
| 18 class LayoutObject; | 18 class LayoutObject; |
| 19 | 19 |
| 20 class BoxPainter { | 20 class BoxPainter { |
| 21 public: | 21 public: |
| 22 BoxPainter(RenderBox& renderBox) : m_renderBox(renderBox) { } | 22 BoxPainter(LayoutBox& layoutBox) : m_layoutBox(layoutBox) { } |
| 23 void paint(const PaintInfo&, const LayoutPoint&); | 23 void paint(const PaintInfo&, const LayoutPoint&); |
| 24 | 24 |
| 25 void paintBoxDecorationBackground(const PaintInfo&, const LayoutPoint&); | 25 void paintBoxDecorationBackground(const PaintInfo&, const LayoutPoint&); |
| 26 void paintMask(const PaintInfo&, const LayoutPoint&); | 26 void paintMask(const PaintInfo&, const LayoutPoint&); |
| 27 void paintClippingMask(const PaintInfo&, const LayoutPoint&); | 27 void paintClippingMask(const PaintInfo&, const LayoutPoint&); |
| 28 void paintFillLayers(const PaintInfo&, const Color&, const FillLayer&, const
LayoutRect&, BackgroundBleedAvoidance = BackgroundBleedNone, SkXfermode::Mode =
SkXfermode::kSrcOver_Mode, LayoutObject* backgroundObject = 0); | 28 void paintFillLayers(const PaintInfo&, const Color&, const FillLayer&, const
LayoutRect&, BackgroundBleedAvoidance = BackgroundBleedNone, SkXfermode::Mode =
SkXfermode::kSrcOver_Mode, LayoutObject* backgroundObject = 0); |
| 29 void paintMaskImages(const PaintInfo&, const LayoutRect&); | 29 void paintMaskImages(const PaintInfo&, const LayoutRect&); |
| 30 void paintBoxDecorationBackgroundWithRect(const PaintInfo&, const LayoutPoin
t&, const LayoutRect&); | 30 void paintBoxDecorationBackgroundWithRect(const PaintInfo&, const LayoutPoin
t&, const LayoutRect&); |
| 31 static void paintFillLayerExtended(LayoutBoxModelObject&, const PaintInfo&,
const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidance, Inl
ineFlowBox* = 0, const LayoutSize& = LayoutSize(), SkXfermode::Mode = SkXfermode
::kSrcOver_Mode, LayoutObject* backgroundObject = 0, bool skipBaseColor = false)
; | 31 static void paintFillLayerExtended(LayoutBoxModelObject&, const PaintInfo&,
const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidance, Inl
ineFlowBox* = 0, const LayoutSize& = LayoutSize(), SkXfermode::Mode = SkXfermode
::kSrcOver_Mode, LayoutObject* backgroundObject = 0, bool skipBaseColor = false)
; |
| 32 static void calculateBackgroundImageGeometry(LayoutBoxModelObject&, const La
youtBoxModelObject* paintContainer, const FillLayer&, const LayoutRect& paintRec
t, BackgroundImageGeometry&, LayoutObject* = 0); | 32 static void calculateBackgroundImageGeometry(LayoutBoxModelObject&, const La
youtBoxModelObject* paintContainer, const FillLayer&, const LayoutRect& paintRec
t, BackgroundImageGeometry&, LayoutObject* = 0); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 61 float thickness, float drawThickness, BoxSide, const LayoutStyle&, | 61 float thickness, float drawThickness, BoxSide, const LayoutStyle&, |
| 62 Color, EBorderStyle, BackgroundBleedAvoidance, bool includeLogicalLeftEd
ge, bool includeLogicalRightEdge); | 62 Color, EBorderStyle, BackgroundBleedAvoidance, bool includeLogicalLeftEd
ge, bool includeLogicalRightEdge); |
| 63 static void clipBorderSidePolygon(GraphicsContext*, const FloatRoundedRect&
outerBorder, const FloatRoundedRect& innerBorder, | 63 static void clipBorderSidePolygon(GraphicsContext*, const FloatRoundedRect&
outerBorder, const FloatRoundedRect& innerBorder, |
| 64 BoxSide, bool firstEdgeMatches, bool secondEdgeMatches); | 64 BoxSide, bool firstEdgeMatches, bool secondEdgeMatches); |
| 65 static void clipBorderSideForComplexInnerPath(GraphicsContext*, const FloatR
oundedRect&, const FloatRoundedRect&, BoxSide, const BorderEdge[]); | 65 static void clipBorderSideForComplexInnerPath(GraphicsContext*, const FloatR
oundedRect&, const FloatRoundedRect&, BoxSide, const BorderEdge[]); |
| 66 | 66 |
| 67 LayoutRect boundsForDrawingRecorder(const LayoutPoint& paintOffset); | 67 LayoutRect boundsForDrawingRecorder(const LayoutPoint& paintOffset); |
| 68 LayoutRect scrolledBackgroundRect(); | 68 LayoutRect scrolledBackgroundRect(); |
| 69 | 69 |
| 70 // FIXME: this should be const. | 70 // FIXME: this should be const. |
| 71 RenderBox& m_renderBox; | 71 LayoutBox& m_layoutBox; |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } // namespace blink | 74 } // namespace blink |
| 75 | 75 |
| 76 #endif | 76 #endif |
| OLD | NEW |