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

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

Issue 564973002: Move a bunch more painting code out of RenderBoxModelObject and into BoxPainter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove unnecessary include. Created 6 years, 3 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
OLDNEW
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/rendering/RenderBoxModelObject.h" 8 #include "core/rendering/RenderBoxModelObject.h"
9 9
10 namespace blink { 10 namespace blink {
(...skipping 11 matching lines...) Expand all
22 void paintBoxDecorationBackground(PaintInfo&, const LayoutPoint&); 22 void paintBoxDecorationBackground(PaintInfo&, const LayoutPoint&);
23 void paintMask(PaintInfo&, const LayoutPoint&); 23 void paintMask(PaintInfo&, const LayoutPoint&);
24 void paintClippingMask(PaintInfo&, const LayoutPoint&); 24 void paintClippingMask(PaintInfo&, const LayoutPoint&);
25 void paintFillLayers(const PaintInfo&, const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidance = BackgroundBleedNone, CompositeOperator = CompositeSourceOver, RenderObject* backgroundObject = 0); 25 void paintFillLayers(const PaintInfo&, const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidance = BackgroundBleedNone, CompositeOperator = CompositeSourceOver, RenderObject* backgroundObject = 0);
26 void paintMaskImages(const PaintInfo&, const LayoutRect&); 26 void paintMaskImages(const PaintInfo&, const LayoutRect&);
27 void paintBoxDecorationBackgroundWithRect(PaintInfo&, const LayoutPoint&, co nst LayoutRect&); 27 void paintBoxDecorationBackgroundWithRect(PaintInfo&, const LayoutPoint&, co nst LayoutRect&);
28 void paintFillLayerExtended(const PaintInfo&, const Color&, const FillLayer& , const LayoutRect&, BackgroundBleedAvoidance, InlineFlowBox* = 0, const LayoutS ize& = LayoutSize(), CompositeOperator = CompositeSourceOver, RenderObject* back groundObject = 0, bool skipBaseColor = false); 28 void paintFillLayerExtended(const PaintInfo&, const Color&, const FillLayer& , const LayoutRect&, BackgroundBleedAvoidance, InlineFlowBox* = 0, const LayoutS ize& = LayoutSize(), CompositeOperator = CompositeSourceOver, RenderObject* back groundObject = 0, bool skipBaseColor = false);
29 void calculateBackgroundImageGeometry(const RenderLayerModelObject* paintCon tainer, const FillLayer&, const LayoutRect& paintRect, BackgroundImageGeometry&, RenderObject* = 0) const; 29 void calculateBackgroundImageGeometry(const RenderLayerModelObject* paintCon tainer, const FillLayer&, const LayoutRect& paintRect, BackgroundImageGeometry&, RenderObject* = 0) const;
30 InterpolationQuality chooseInterpolationQuality(GraphicsContext*, Image*, co nst void*, const LayoutSize&); 30 InterpolationQuality chooseInterpolationQuality(GraphicsContext*, Image*, co nst void*, const LayoutSize&);
31 static void clipRoundedInnerRect(GraphicsContext*, const LayoutRect&, const RoundedRect& clipRect); 31 static void clipRoundedInnerRect(GraphicsContext*, const LayoutRect&, const RoundedRect& clipRect);
32 bool paintNinePieceImage(GraphicsContext*, const LayoutRect&, const RenderSt yle*, const NinePieceImage&, CompositeOperator = CompositeSourceOver);
33 void paintBorder(const PaintInfo&, const LayoutRect&, const RenderStyle*, Ba ckgroundBleedAvoidance = BackgroundBleedNone, bool includeLogicalLeftEdge = true , bool includeLogicalRightEdge = true);
34 void paintBoxShadow(const PaintInfo&, const LayoutRect&, const RenderStyle*, ShadowStyle, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true);
35 static bool shouldAntialiasLines(GraphicsContext*);
32 36
33 private: 37 private:
34 void paintBackground(const PaintInfo&, const LayoutRect&, const Color& backg roundColor, BackgroundBleedAvoidance = BackgroundBleedNone); 38 void paintBackground(const PaintInfo&, const LayoutRect&, const Color& backg roundColor, BackgroundBleedAvoidance = BackgroundBleedNone);
35 void paintRootBoxFillLayers(const PaintInfo&); 39 void paintRootBoxFillLayers(const PaintInfo&);
36 void paintFillLayer(const PaintInfo&, const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidance, CompositeOperator, RenderObject* backgrou ndObject, bool skipBaseColor = false); 40 void paintFillLayer(const PaintInfo&, const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidance, CompositeOperator, RenderObject* backgrou ndObject, bool skipBaseColor = false);
37 void paintRootBackgroundColor(const PaintInfo&, const LayoutRect&, const Col or&); 41 void paintRootBackgroundColor(const PaintInfo&, const LayoutRect&, const Col or&);
38 RoundedRect backgroundRoundedRectAdjustedForBleedAvoidance(GraphicsContext*, const LayoutRect&, BackgroundBleedAvoidance, InlineFlowBox*, const LayoutSize&, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const; 42 RoundedRect backgroundRoundedRectAdjustedForBleedAvoidance(GraphicsContext*, const LayoutRect&, BackgroundBleedAvoidance, InlineFlowBox*, const LayoutSize&, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const;
39 RoundedRect getBackgroundRoundedRect(const LayoutRect&, InlineFlowBox*, Layo utUnit inlineBoxWidth, LayoutUnit inlineBoxHeight, 43 RoundedRect getBackgroundRoundedRect(const LayoutRect&, InlineFlowBox*, Layo utUnit inlineBoxWidth, LayoutUnit inlineBoxHeight,
40 bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const; 44 bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const;
41 bool isDocumentElementWithOpaqueBackground() const; 45 bool isDocumentElementWithOpaqueBackground() const;
42 void applyBoxShadowForBackground(GraphicsContext*); 46 void applyBoxShadowForBackground(GraphicsContext*);
43 bool fixedBackgroundPaintsInLocalCoordinates() const; 47 bool fixedBackgroundPaintsInLocalCoordinates() const;
44 IntSize calculateFillTileSize(const FillLayer&, const IntSize& scaledPositio ningAreaSize) const; 48 IntSize calculateFillTileSize(const FillLayer&, const IntSize& scaledPositio ningAreaSize) const;
49 void paintTranslucentBorderSides(GraphicsContext*, const RenderStyle*, const RoundedRect& outerBorder, const RoundedRect& innerBorder, const IntPoint& inner BorderAdjustment,
50 const BorderEdge[], BorderEdgeFlags, BackgroundBleedAvoidance, bool incl udeLogicalLeftEdge, bool includeLogicalRightEdge, bool antialias = false);
51 LayoutRect borderInnerRectAdjustedForBleedAvoidance(GraphicsContext*, const LayoutRect&, BackgroundBleedAvoidance) const;
52 void paintOneBorderSide(GraphicsContext*, const RenderStyle*, const RoundedR ect& outerBorder, const RoundedRect& innerBorder,
53 const IntRect& sideRect, BoxSide, BoxSide adjacentSide1, BoxSide adjacen tSide2, const BorderEdge[],
54 const Path*, BackgroundBleedAvoidance, bool includeLogicalLeftEdge, bool includeLogicalRightEdge, bool antialias, const Color* overrideColor = 0);
55 void paintBorderSides(GraphicsContext*, const RenderStyle*, const RoundedRec t& outerBorder, const RoundedRect& innerBorder,
56 const IntPoint& innerBorderAdjustment, const BorderEdge[], BorderEdgeFla gs, BackgroundBleedAvoidance,
57 bool includeLogicalLeftEdge, bool includeLogicalRightEdge, bool antialia s = false, const Color* overrideColor = 0);
58 void drawBoxSideFromPath(GraphicsContext*, const LayoutRect&, const Path&, c onst BorderEdge[],
59 float thickness, float drawThickness, BoxSide, const RenderStyle*,
60 Color, EBorderStyle, BackgroundBleedAvoidance, bool includeLogicalLeftEd ge, bool includeLogicalRightEdge);
61 void clipBorderSidePolygon(GraphicsContext*, const RoundedRect& outerBorder, const RoundedRect& innerBorder,
62 BoxSide, bool firstEdgeMatches, bool secondEdgeMatches);
63 void clipBorderSideForComplexInnerPath(GraphicsContext*, const RoundedRect&, const RoundedRect&, BoxSide, const BorderEdge[]);
45 64
46 // FIXME: this should be const. 65 // FIXME: this should be const.
47 RenderBox& m_renderBox; 66 RenderBox& m_renderBox;
48 }; 67 };
49 68
50 } // namespace blink 69 } // namespace blink
51 70
52 #endif 71 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/paint/BoxPainter.cpp » ('j') | Source/core/rendering/RenderFieldset.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698