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

Side by Side Diff: Source/core/paint/DeprecatedPaintLayerPainter.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 DeprecatedPaintLayerPainter_h 5 #ifndef DeprecatedPaintLayerPainter_h
6 #define DeprecatedPaintLayerPainter_h 6 #define DeprecatedPaintLayerPainter_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/paint/DeprecatedPaintLayerFragment.h" 9 #include "core/paint/DeprecatedPaintLayerFragment.h"
10 #include "core/paint/DeprecatedPaintLayerPaintingInfo.h" 10 #include "core/paint/DeprecatedPaintLayerPaintingInfo.h"
11 #include "wtf/Allocator.h"
11 12
12 namespace blink { 13 namespace blink {
13 14
14 class ClipRect; 15 class ClipRect;
15 class DeprecatedPaintLayer; 16 class DeprecatedPaintLayer;
16 class GraphicsContext; 17 class GraphicsContext;
17 class LayoutPoint; 18 class LayoutPoint;
18 19
19 class CORE_EXPORT DeprecatedPaintLayerPainter { 20 class CORE_EXPORT DeprecatedPaintLayerPainter {
21 STACK_ALLOCATED();
20 public: 22 public:
21 enum FragmentPolicy { AllowMultipleFragments, ForceSingleFragment }; 23 enum FragmentPolicy { AllowMultipleFragments, ForceSingleFragment };
22 24
23 DeprecatedPaintLayerPainter(DeprecatedPaintLayer& paintLayer) : m_paintLayer (paintLayer) { } 25 DeprecatedPaintLayerPainter(DeprecatedPaintLayer& paintLayer) : m_paintLayer (paintLayer) { }
24 26
25 // The paint() method paints the layers that intersect the damage rect from back to front. 27 // The paint() method paints the layers that intersect the damage rect from back to front.
26 // paint() assumes that the caller will clip to the bounds of damageRect if necessary. 28 // paint() assumes that the caller will clip to the bounds of damageRect if necessary.
27 void paint(GraphicsContext*, const LayoutRect& damageRect, const GlobalPaint Flags = GlobalPaintNormalPhase, LayoutObject* paintingRoot = 0, PaintLayerFlags = 0); 29 void paint(GraphicsContext*, const LayoutRect& damageRect, const GlobalPaint Flags = GlobalPaintNormalPhase, LayoutObject* paintingRoot = 0, PaintLayerFlags = 0);
28 // paintLayer() assumes that the caller will clip to the bounds of the paint ing dirty if necessary. 30 // paintLayer() assumes that the caller will clip to the bounds of the paint ing dirty if necessary.
29 void paintLayer(GraphicsContext*, const DeprecatedPaintLayerPaintingInfo&, P aintLayerFlags); 31 void paintLayer(GraphicsContext*, const DeprecatedPaintLayerPaintingInfo&, P aintLayerFlags);
(...skipping 28 matching lines...) Expand all
58 // Returns whether this layer should be painted during sofware painting (i.e ., not via calls from CompositedDeprecatedPaintLayerMapping to draw into composi ted 60 // Returns whether this layer should be painted during sofware painting (i.e ., not via calls from CompositedDeprecatedPaintLayerMapping to draw into composi ted
59 // layers). 61 // layers).
60 bool shouldPaintLayerInSoftwareMode(const GlobalPaintFlags, PaintLayerFlags paintFlags); 62 bool shouldPaintLayerInSoftwareMode(const GlobalPaintFlags, PaintLayerFlags paintFlags);
61 63
62 DeprecatedPaintLayer& m_paintLayer; 64 DeprecatedPaintLayer& m_paintLayer;
63 }; 65 };
64 66
65 } // namespace blink 67 } // namespace blink
66 68
67 #endif // DeprecatedPaintLayerPainter_h 69 #endif // DeprecatedPaintLayerPainter_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698