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

Side by Side Diff: Source/core/paint/ImagePainter.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 ImagePainter_h 5 #ifndef ImagePainter_h
6 #define ImagePainter_h 6 #define ImagePainter_h
7 7
8 #include "wtf/Allocator.h"
9
8 namespace blink { 10 namespace blink {
9 11
10 class GraphicsContext; 12 class GraphicsContext;
11 struct PaintInfo; 13 struct PaintInfo;
12 class LayoutPoint; 14 class LayoutPoint;
13 class LayoutRect; 15 class LayoutRect;
14 class LayoutImage; 16 class LayoutImage;
15 17
16 class ImagePainter { 18 class ImagePainter {
19 STACK_ALLOCATED();
17 public: 20 public:
18 ImagePainter(LayoutImage& layoutImage) : m_layoutImage(layoutImage) { } 21 ImagePainter(LayoutImage& layoutImage) : m_layoutImage(layoutImage) { }
19 22
20 void paint(const PaintInfo&, const LayoutPoint& paintOffset); 23 void paint(const PaintInfo&, const LayoutPoint& paintOffset);
21 void paintReplaced(const PaintInfo&, const LayoutPoint& paintOffset); 24 void paintReplaced(const PaintInfo&, const LayoutPoint& paintOffset);
22 void paintIntoRect(GraphicsContext*, const LayoutRect&); 25 void paintIntoRect(GraphicsContext*, const LayoutRect&);
23 26
24 private: 27 private:
25 void paintAreaElementFocusRing(const PaintInfo&); 28 void paintAreaElementFocusRing(const PaintInfo&);
26 29
27 LayoutImage& m_layoutImage; 30 LayoutImage& m_layoutImage;
28 }; 31 };
29 32
30 } // namespace blink 33 } // namespace blink
31 34
32 #endif // ImagePainter_h 35 #endif // ImagePainter_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698