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

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

Issue 1298553004: Make LayoutBoxModelObject const when passed to calculateBackgroundImageGeometry (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | Source/core/paint/BoxPainter.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 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
(...skipping 18 matching lines...) Expand all
29 typedef Vector<const FillLayer*, 8> FillLayerOcclusionOutputList; 29 typedef Vector<const FillLayer*, 8> FillLayerOcclusionOutputList;
30 // Returns true if the result fill layers have non-associative blending or c ompositing mode. 30 // Returns true if the result fill layers have non-associative blending or c ompositing mode.
31 // (i.e. The rendering will be different without creating isolation group by context.saveLayer().) 31 // (i.e. The rendering will be different without creating isolation group by context.saveLayer().)
32 // Note that the output list will be in top-bottom order. 32 // Note that the output list will be in top-bottom order.
33 bool calculateFillLayerOcclusionCulling(FillLayerOcclusionOutputList &revers edPaintList, const FillLayer&); 33 bool calculateFillLayerOcclusionCulling(FillLayerOcclusionOutputList &revers edPaintList, const FillLayer&);
34 34
35 void paintFillLayers(const PaintInfo&, const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidance = BackgroundBleedNone, SkXfermode::Mode = SkXfermode::kSrcOver_Mode, LayoutObject* backgroundObject = nullptr); 35 void paintFillLayers(const PaintInfo&, const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidance = BackgroundBleedNone, SkXfermode::Mode = SkXfermode::kSrcOver_Mode, LayoutObject* backgroundObject = nullptr);
36 void paintMaskImages(const PaintInfo&, const LayoutRect&); 36 void paintMaskImages(const PaintInfo&, const LayoutRect&);
37 void paintBoxDecorationBackgroundWithRect(const PaintInfo&, const LayoutPoin t&, const LayoutRect&); 37 void paintBoxDecorationBackgroundWithRect(const PaintInfo&, const LayoutPoin t&, const LayoutRect&);
38 static void paintFillLayerExtended(LayoutBoxModelObject&, const PaintInfo&, const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidance, Inl ineFlowBox* = nullptr, const LayoutSize& = LayoutSize(), SkXfermode::Mode = SkXf ermode::kSrcOver_Mode, LayoutObject* backgroundObject = nullptr); 38 static void paintFillLayerExtended(LayoutBoxModelObject&, const PaintInfo&, const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidance, Inl ineFlowBox* = nullptr, const LayoutSize& = LayoutSize(), SkXfermode::Mode = SkXf ermode::kSrcOver_Mode, LayoutObject* backgroundObject = nullptr);
39 static void calculateBackgroundImageGeometry(LayoutBoxModelObject&, const La youtBoxModelObject* paintContainer, const GlobalPaintFlags, const FillLayer&, co nst LayoutRect& paintRect, BackgroundImageGeometry&, LayoutObject* backgroundObj ect = nullptr); 39 static void calculateBackgroundImageGeometry(const LayoutBoxModelObject&, co nst LayoutBoxModelObject* paintContainer, const GlobalPaintFlags, const FillLaye r&, const LayoutRect& paintRect, BackgroundImageGeometry&, LayoutObject* backgro undObject = nullptr);
40 static InterpolationQuality chooseInterpolationQuality(LayoutObject&, Graphi csContext*, Image*, const void*, const LayoutSize&); 40 static InterpolationQuality chooseInterpolationQuality(LayoutObject&, Graphi csContext*, Image*, const void*, const LayoutSize&);
41 static bool paintNinePieceImage(LayoutBoxModelObject&, GraphicsContext*, con st LayoutRect&, const ComputedStyle&, const NinePieceImage&, SkXfermode::Mode = SkXfermode::kSrcOver_Mode); 41 static bool paintNinePieceImage(LayoutBoxModelObject&, GraphicsContext*, con st LayoutRect&, const ComputedStyle&, const NinePieceImage&, SkXfermode::Mode = SkXfermode::kSrcOver_Mode);
42 static void paintBorder(LayoutBoxModelObject&, const PaintInfo&, const Layou tRect&, const ComputedStyle&, BackgroundBleedAvoidance = BackgroundBleedNone, bo ol includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true); 42 static void paintBorder(LayoutBoxModelObject&, const PaintInfo&, const Layou tRect&, const ComputedStyle&, BackgroundBleedAvoidance = BackgroundBleedNone, bo ol includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true);
43 static void paintBoxShadow(const PaintInfo&, const LayoutRect&, const Comput edStyle&, ShadowStyle, bool includeLogicalLeftEdge = true, bool includeLogicalRi ghtEdge = true); 43 static void paintBoxShadow(const PaintInfo&, const LayoutRect&, const Comput edStyle&, ShadowStyle, bool includeLogicalLeftEdge = true, bool includeLogicalRi ghtEdge = true);
44 static bool shouldAntialiasLines(GraphicsContext*); 44 static bool shouldAntialiasLines(GraphicsContext*);
45 static bool allCornersClippedOut(const FloatRoundedRect& border, const IntRe ct& clipRect); 45 static bool allCornersClippedOut(const FloatRoundedRect& border, const IntRe ct& clipRect);
46 static bool shouldForceWhiteBackgroundForPrintEconomy(const ComputedStyle&, const Document&); 46 static bool shouldForceWhiteBackgroundForPrintEconomy(const ComputedStyle&, const Document&);
47 47
48 private: 48 private:
49 void paintBackground(const PaintInfo&, const LayoutRect&, const Color& backg roundColor, BackgroundBleedAvoidance = BackgroundBleedNone); 49 void paintBackground(const PaintInfo&, const LayoutRect&, const Color& backg roundColor, BackgroundBleedAvoidance = BackgroundBleedNone);
50 void paintFillLayer(const PaintInfo&, const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidance, SkXfermode::Mode, LayoutObject* backgroun dObject = nullptr); 50 void paintFillLayer(const PaintInfo&, const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidance, SkXfermode::Mode, LayoutObject* backgroun dObject = nullptr);
51 static FloatRoundedRect backgroundRoundedRectAdjustedForBleedAvoidance(Layou tObject&, const LayoutRect&, BackgroundBleedAvoidance, InlineFlowBox*, const Lay outSize&, bool includeLogicalLeftEdge, bool includeLogicalRightEdge); 51 static FloatRoundedRect backgroundRoundedRectAdjustedForBleedAvoidance(Layou tObject&, const LayoutRect&, BackgroundBleedAvoidance, InlineFlowBox*, const Lay outSize&, bool includeLogicalLeftEdge, bool includeLogicalRightEdge);
52 static FloatRoundedRect getBackgroundRoundedRect(LayoutObject&, const Layout Rect&, InlineFlowBox*, LayoutUnit inlineBoxWidth, LayoutUnit inlineBoxHeight, 52 static FloatRoundedRect getBackgroundRoundedRect(LayoutObject&, const Layout Rect&, InlineFlowBox*, LayoutUnit inlineBoxWidth, LayoutUnit inlineBoxHeight,
53 bool includeLogicalLeftEdge, bool includeLogicalRightEdge); 53 bool includeLogicalLeftEdge, bool includeLogicalRightEdge);
54 static void applyBoxShadowForBackground(GraphicsContext*, LayoutObject&); 54 static void applyBoxShadowForBackground(GraphicsContext*, LayoutObject&);
55 static bool fixedBackgroundPaintsInLocalCoordinates(const LayoutObject&, con st GlobalPaintFlags); 55 static bool fixedBackgroundPaintsInLocalCoordinates(const LayoutObject&, con st GlobalPaintFlags);
56 static IntSize calculateFillTileSize(const LayoutBoxModelObject&, const Fill Layer&, const IntSize& scaledPositioningAreaSize); 56 static IntSize calculateFillTileSize(const LayoutBoxModelObject&, const Fill Layer&, const IntSize& scaledPositioningAreaSize);
57 57
58 LayoutRect boundsForDrawingRecorder(const LayoutPoint& paintOffset); 58 LayoutRect boundsForDrawingRecorder(const LayoutPoint& paintOffset);
59 59
60 // FIXME: this should be const. 60 // FIXME: this should be const.
61 LayoutBox& m_layoutBox; 61 LayoutBox& m_layoutBox;
62 }; 62 };
63 63
64 } // namespace blink 64 } // namespace blink
65 65
66 #endif 66 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/paint/BoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698