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

Side by Side Diff: Source/core/paint/EllipsisBoxPainter.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 EllipsisBoxPainter_h 5 #ifndef EllipsisBoxPainter_h
6 #define EllipsisBoxPainter_h 6 #define EllipsisBoxPainter_h
7 7
8 #include "wtf/Allocator.h"
9
8 namespace blink { 10 namespace blink {
9 11
10 struct PaintInfo; 12 struct PaintInfo;
11 13
12 class EllipsisBox; 14 class EllipsisBox;
13 class FloatPoint; 15 class FloatPoint;
14 class Font; 16 class Font;
15 class GraphicsContext; 17 class GraphicsContext;
16 class LayoutPoint; 18 class LayoutPoint;
17 class LayoutUnit; 19 class LayoutUnit;
18 class ComputedStyle; 20 class ComputedStyle;
19 21
20 class EllipsisBoxPainter { 22 class EllipsisBoxPainter {
23 STACK_ALLOCATED();
21 public: 24 public:
22 EllipsisBoxPainter(EllipsisBox& ellipsisBox) : m_ellipsisBox(ellipsisBox) { } 25 EllipsisBoxPainter(EllipsisBox& ellipsisBox) : m_ellipsisBox(ellipsisBox) { }
23 26
24 void paint(const PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutU nit lineBottom); 27 void paint(const PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutU nit lineBottom);
25 28
26 private: 29 private:
27 void paintEllipsis(const PaintInfo&, const LayoutPoint& paintOffset, LayoutU nit lineTop, LayoutUnit lineBottom, const ComputedStyle&); 30 void paintEllipsis(const PaintInfo&, const LayoutPoint& paintOffset, LayoutU nit lineTop, LayoutUnit lineBottom, const ComputedStyle&);
28 void paintSelection(GraphicsContext*, const LayoutPoint&, const ComputedStyl e&, const Font&); 31 void paintSelection(GraphicsContext*, const LayoutPoint&, const ComputedStyl e&, const Font&);
29 32
30 EllipsisBox& m_ellipsisBox; 33 EllipsisBox& m_ellipsisBox;
31 }; 34 };
32 35
33 } // namespace blink 36 } // namespace blink
34 37
35 #endif // EllipsisBoxPainter_h 38 #endif // EllipsisBoxPainter_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698