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

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

Issue 1319893002: Make classes and structures in core/paint fast-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
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 InlineFlowBoxPainter_h 5 #ifndef InlineFlowBoxPainter_h
6 #define InlineFlowBoxPainter_h 6 #define InlineFlowBoxPainter_h
7 7
8 #include "core/style/ShadowData.h" 8 #include "core/style/ShadowData.h"
9 #include "platform/graphics/GraphicsTypes.h" 9 #include "platform/graphics/GraphicsTypes.h"
10 #include "platform/text/TextDirection.h" 10 #include "platform/text/TextDirection.h"
11 #include "wtf/Allocator.h"
11 12
12 namespace blink { 13 namespace blink {
13 14
14 class Color; 15 class Color;
15 class FillLayer; 16 class FillLayer;
16 class InlineFlowBox; 17 class InlineFlowBox;
17 class LayoutPoint; 18 class LayoutPoint;
18 class LayoutRect; 19 class LayoutRect;
19 class LayoutSize; 20 class LayoutSize;
20 class LayoutUnit; 21 class LayoutUnit;
21 struct PaintInfo; 22 struct PaintInfo;
22 class ComputedStyle; 23 class ComputedStyle;
23 24
24 class InlineFlowBoxPainter { 25 class InlineFlowBoxPainter {
26 STACK_ALLOCATED();
25 public: 27 public:
26 InlineFlowBoxPainter(InlineFlowBox& inlineFlowBox) : m_inlineFlowBox(inlineF lowBox) { } 28 InlineFlowBoxPainter(InlineFlowBox& inlineFlowBox) : m_inlineFlowBox(inlineF lowBox) { }
27 void paint(const PaintInfo&, const LayoutPoint& paintOffset, const LayoutUni t lineTop, const LayoutUnit lineBottom); 29 void paint(const PaintInfo&, const LayoutPoint& paintOffset, const LayoutUni t lineTop, const LayoutUnit lineBottom);
28 30
29 private: 31 private:
30 void paintBoxDecorationBackground(const PaintInfo&, const LayoutPoint& paint Offset, const LayoutRect& cullRect); 32 void paintBoxDecorationBackground(const PaintInfo&, const LayoutPoint& paint Offset, const LayoutRect& cullRect);
31 void paintMask(const PaintInfo&, const LayoutPoint& paintOffset); 33 void paintMask(const PaintInfo&, const LayoutPoint& paintOffset);
32 void paintFillLayers(const PaintInfo&, const Color&, const FillLayer&, const LayoutRect&, SkXfermode::Mode op = SkXfermode::kSrcOver_Mode); 34 void paintFillLayers(const PaintInfo&, const Color&, const FillLayer&, const LayoutRect&, SkXfermode::Mode op = SkXfermode::kSrcOver_Mode);
33 void paintFillLayer(const PaintInfo&, const Color&, const FillLayer&, const LayoutRect&, SkXfermode::Mode op); 35 void paintFillLayer(const PaintInfo&, const Color&, const FillLayer&, const LayoutRect&, SkXfermode::Mode op);
34 void paintBoxShadow(const PaintInfo&, const ComputedStyle&, ShadowStyle, con st LayoutRect& paintRect); 36 void paintBoxShadow(const PaintInfo&, const ComputedStyle&, ShadowStyle, con st LayoutRect& paintRect);
35 LayoutRect roundedFrameRectClampedToLineTopAndBottomIfNeeded() const; 37 LayoutRect roundedFrameRectClampedToLineTopAndBottomIfNeeded() const;
36 LayoutRect paintRectForImageStrip(const LayoutPoint& paintOffset, const Layo utSize& frameSize, TextDirection) const; 38 LayoutRect paintRectForImageStrip(const LayoutPoint& paintOffset, const Layo utSize& frameSize, TextDirection) const;
37 39
38 enum BorderPaintingType { 40 enum BorderPaintingType {
39 DontPaintBorders, 41 DontPaintBorders,
40 PaintBordersWithoutClip, 42 PaintBordersWithoutClip,
41 PaintBordersWithClip 43 PaintBordersWithClip
42 }; 44 };
43 BorderPaintingType getBorderPaintType(const LayoutRect& adjustedFrameRect, L ayoutRect& adjustedClipRect) const; 45 BorderPaintingType getBorderPaintType(const LayoutRect& adjustedFrameRect, L ayoutRect& adjustedClipRect) const;
44 46
45 InlineFlowBox& m_inlineFlowBox; 47 InlineFlowBox& m_inlineFlowBox;
46 }; 48 };
47 49
48 } // namespace blink 50 } // namespace blink
49 51
50 #endif // InlineFlowBoxPainter_h 52 #endif // InlineFlowBoxPainter_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698