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

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

Issue 1527343002: Simplify paintFillLayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | third_party/WebKit/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 #include "wtf/Allocator.h" 10 #include "wtf/Allocator.h"
(...skipping 19 matching lines...) Expand all
30 30
31 typedef Vector<const FillLayer*, 8> FillLayerOcclusionOutputList; 31 typedef Vector<const FillLayer*, 8> FillLayerOcclusionOutputList;
32 // Returns true if the result fill layers have non-associative blending or c ompositing mode. 32 // Returns true if the result fill layers have non-associative blending or c ompositing mode.
33 // (i.e. The rendering will be different without creating isolation group by context.saveLayer().) 33 // (i.e. The rendering will be different without creating isolation group by context.saveLayer().)
34 // Note that the output list will be in top-bottom order. 34 // Note that the output list will be in top-bottom order.
35 bool calculateFillLayerOcclusionCulling(FillLayerOcclusionOutputList &revers edPaintList, const FillLayer&); 35 bool calculateFillLayerOcclusionCulling(FillLayerOcclusionOutputList &revers edPaintList, const FillLayer&);
36 36
37 void paintFillLayers(const PaintInfo&, const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidance = BackgroundBleedNone, SkXfermode::Mode = SkXfermode::kSrcOver_Mode, const LayoutObject* backgroundObject = nullptr); 37 void paintFillLayers(const PaintInfo&, const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidance = BackgroundBleedNone, SkXfermode::Mode = SkXfermode::kSrcOver_Mode, const LayoutObject* backgroundObject = nullptr);
38 void paintMaskImages(const PaintInfo&, const LayoutRect&); 38 void paintMaskImages(const PaintInfo&, const LayoutRect&);
39 void paintBoxDecorationBackgroundWithRect(const PaintInfo&, const LayoutPoin t&, const LayoutRect&); 39 void paintBoxDecorationBackgroundWithRect(const PaintInfo&, const LayoutPoin t&, const LayoutRect&);
40 static void paintFillLayerExtended(const LayoutBoxModelObject&, const PaintI nfo&, const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidanc e, const InlineFlowBox* = nullptr, const LayoutSize& = LayoutSize(), SkXfermode: :Mode = SkXfermode::kSrcOver_Mode, const LayoutObject* backgroundObject = nullpt r); 40 static void paintFillLayer(const LayoutBoxModelObject&, const PaintInfo&, co nst Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidance, const InlineFlowBox* = nullptr, const LayoutSize& = LayoutSize(), SkXfermode::Mode = SkXfermode::kSrcOver_Mode, const LayoutObject* backgroundObject = nullptr);
41 static InterpolationQuality chooseInterpolationQuality(const LayoutObject&, Image*, const void*, const LayoutSize&); 41 static InterpolationQuality chooseInterpolationQuality(const LayoutObject&, Image*, const void*, const LayoutSize&);
42 static bool paintNinePieceImage(const LayoutBoxModelObject&, GraphicsContext &, const LayoutRect&, const ComputedStyle&, const NinePieceImage&, SkXfermode::M ode = SkXfermode::kSrcOver_Mode); 42 static bool paintNinePieceImage(const LayoutBoxModelObject&, GraphicsContext &, const LayoutRect&, const ComputedStyle&, const NinePieceImage&, SkXfermode::M ode = SkXfermode::kSrcOver_Mode);
43 static void paintBorder(const LayoutBoxModelObject&, const PaintInfo&, const LayoutRect&, const ComputedStyle&, BackgroundBleedAvoidance = BackgroundBleedNo ne, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true); 43 static void paintBorder(const LayoutBoxModelObject&, const PaintInfo&, const LayoutRect&, const ComputedStyle&, BackgroundBleedAvoidance = BackgroundBleedNo ne, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true);
44 static void paintBoxShadow(const PaintInfo&, const LayoutRect&, const Comput edStyle&, ShadowStyle, bool includeLogicalLeftEdge = true, bool includeLogicalRi ghtEdge = true); 44 static void paintBoxShadow(const PaintInfo&, const LayoutRect&, const Comput edStyle&, ShadowStyle, bool includeLogicalLeftEdge = true, bool includeLogicalRi ghtEdge = true);
45 static bool shouldForceWhiteBackgroundForPrintEconomy(const ComputedStyle&, const Document&); 45 static bool shouldForceWhiteBackgroundForPrintEconomy(const ComputedStyle&, const Document&);
46 46
47 private: 47 private:
48 void paintBackground(const PaintInfo&, const LayoutRect&, const Color& backg roundColor, BackgroundBleedAvoidance = BackgroundBleedNone); 48 void paintBackground(const PaintInfo&, const LayoutRect&, const Color& backg roundColor, BackgroundBleedAvoidance = BackgroundBleedNone);
49 void paintFillLayer(const PaintInfo&, const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidance, SkXfermode::Mode, const LayoutObject* bac kgroundObject = nullptr);
50 static FloatRoundedRect backgroundRoundedRectAdjustedForBleedAvoidance(const LayoutObject&, const LayoutRect&, BackgroundBleedAvoidance, const InlineFlowBox *, const LayoutSize&, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) ; 49 static FloatRoundedRect backgroundRoundedRectAdjustedForBleedAvoidance(const LayoutObject&, const LayoutRect&, BackgroundBleedAvoidance, const InlineFlowBox *, const LayoutSize&, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) ;
51 static FloatRoundedRect getBackgroundRoundedRect(const LayoutObject&, const LayoutRect&, const InlineFlowBox*, LayoutUnit inlineBoxWidth, LayoutUnit inlineB oxHeight, 50 static FloatRoundedRect getBackgroundRoundedRect(const LayoutObject&, const LayoutRect&, const InlineFlowBox*, LayoutUnit inlineBoxWidth, LayoutUnit inlineB oxHeight,
52 bool includeLogicalLeftEdge, bool includeLogicalRightEdge); 51 bool includeLogicalLeftEdge, bool includeLogicalRightEdge);
53 static void applyBoxShadowForBackground(GraphicsContext&, const LayoutObject &); 52 static void applyBoxShadowForBackground(GraphicsContext&, const LayoutObject &);
54 53
55 LayoutRect boundsForDrawingRecorder(const LayoutPoint& paintOffset); 54 LayoutRect boundsForDrawingRecorder(const LayoutPoint& paintOffset);
56 55
57 const LayoutBox& m_layoutBox; 56 const LayoutBox& m_layoutBox;
58 }; 57 };
59 58
60 } // namespace blink 59 } // namespace blink
61 60
62 #endif 61 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/BoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698