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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.h

Issue 1497683002: Make platform/graphics to use USING_FAST_MALLOC. (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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 PaintArtifact_h 5 #ifndef PaintArtifact_h
6 #define PaintArtifact_h 6 #define PaintArtifact_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "platform/graphics/paint/DisplayItemList.h" 9 #include "platform/graphics/paint/DisplayItemList.h"
10 #include "platform/graphics/paint/PaintChunk.h" 10 #include "platform/graphics/paint/PaintChunk.h"
11 #include "wtf/Allocator.h"
12 #include "wtf/Noncopyable.h"
11 #include "wtf/Vector.h" 13 #include "wtf/Vector.h"
12 14
13 namespace blink { 15 namespace blink {
14 16
15 class GraphicsContext; 17 class GraphicsContext;
16 class WebDisplayItemList; 18 class WebDisplayItemList;
17 19
18 // The output of painting, consisting of a series of drawings in paint order, 20 // The output of painting, consisting of a series of drawings in paint order,
19 // partitioned into discontiguous chunks with a common set of paint properties 21 // partitioned into discontiguous chunks with a common set of paint properties
20 // (i.e. associated with the same transform, clip, effects, etc.). 22 // (i.e. associated with the same transform, clip, effects, etc.).
21 // 23 //
22 // It represents a particular state of the world, and should be immutable 24 // It represents a particular state of the world, and should be immutable
23 // (const) to most of its users. 25 // (const) to most of its users.
24 class PLATFORM_EXPORT PaintArtifact { 26 class PLATFORM_EXPORT PaintArtifact final {
27 DISALLOW_NEW();
28 WTF_MAKE_NONCOPYABLE(PaintArtifact);
25 public: 29 public:
26 PaintArtifact(); 30 PaintArtifact();
27 ~PaintArtifact(); 31 ~PaintArtifact();
28 32
29 bool isEmpty() const { return m_displayItemList.isEmpty(); } 33 bool isEmpty() const { return m_displayItemList.isEmpty(); }
30 34
31 DisplayItemList& displayItemList() { return m_displayItemList; } 35 DisplayItemList& displayItemList() { return m_displayItemList; }
32 const DisplayItemList& displayItemList() const { return m_displayItemList; } 36 const DisplayItemList& displayItemList() const { return m_displayItemList; }
33 37
34 Vector<PaintChunk>& paintChunks() { return m_paintChunks; } 38 Vector<PaintChunk>& paintChunks() { return m_paintChunks; }
(...skipping 13 matching lines...) Expand all
48 void appendToWebDisplayItemList(WebDisplayItemList*) const; 52 void appendToWebDisplayItemList(WebDisplayItemList*) const;
49 53
50 private: 54 private:
51 DisplayItemList m_displayItemList; 55 DisplayItemList m_displayItemList;
52 Vector<PaintChunk> m_paintChunks; 56 Vector<PaintChunk> m_paintChunks;
53 }; 57 };
54 58
55 } // namespace blink 59 } // namespace blink
56 60
57 #endif // PaintArtifact_h 61 #endif // PaintArtifact_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698