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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/PaintChunk.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 PaintChunk_h 5 #ifndef PaintChunk_h
6 #define PaintChunk_h 6 #define PaintChunk_h
7 7
8 #include "platform/graphics/paint/PaintChunkProperties.h" 8 #include "platform/graphics/paint/PaintChunkProperties.h"
9 #include "wtf/Allocator.h"
9 #include <iosfwd> 10 #include <iosfwd>
10 11
11 namespace blink { 12 namespace blink {
12 13
13 // A contiguous sequence of drawings with common paint properties. 14 // A contiguous sequence of drawings with common paint properties.
14 // 15 //
15 // This is expected to be owned by the paint artifact which also owns the 16 // This is expected to be owned by the paint artifact which also owns the
16 // related drawings. 17 // related drawings.
17 // 18 //
18 // This is a Slimming Paint v2 class. 19 // This is a Slimming Paint v2 class.
19 struct PaintChunk { 20 struct PaintChunk {
21 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
20 PaintChunk() : beginIndex(0), endIndex(0) { } 22 PaintChunk() : beginIndex(0), endIndex(0) { }
21 PaintChunk(unsigned begin, unsigned end, const PaintChunkProperties& props) 23 PaintChunk(unsigned begin, unsigned end, const PaintChunkProperties& props)
22 : beginIndex(begin), endIndex(end), properties(props) { } 24 : beginIndex(begin), endIndex(end), properties(props) { }
23 25
24 // Index of the first drawing in this chunk. 26 // Index of the first drawing in this chunk.
25 unsigned beginIndex; 27 unsigned beginIndex;
26 28
27 // Index of the first drawing not in this chunk, so that there are 29 // Index of the first drawing not in this chunk, so that there are
28 // |endIndex - beginIndex| drawings in the chunk. 30 // |endIndex - beginIndex| drawings in the chunk.
29 unsigned endIndex; 31 unsigned endIndex;
(...skipping 14 matching lines...) Expand all
44 return !(a == b); 46 return !(a == b);
45 } 47 }
46 48
47 // Redeclared here to avoid ODR issues. 49 // Redeclared here to avoid ODR issues.
48 // See platform/testing/PaintPrinters.h. 50 // See platform/testing/PaintPrinters.h.
49 void PrintTo(const PaintChunk&, std::ostream*); 51 void PrintTo(const PaintChunk&, std::ostream*);
50 52
51 } // namespace blink 53 } // namespace blink
52 54
53 #endif // PaintChunk_h 55 #endif // PaintChunk_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698