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

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

Issue 1397583002: Implement the framework for a paint property hierarchy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Job insecurity: better tests, better comments, better names. Created 5 years, 2 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 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 PaintChunker_h 5 #ifndef PaintChunker_h
6 #define PaintChunker_h 6 #define PaintChunker_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "platform/graphics/paint/PaintChunk.h" 9 #include "platform/graphics/paint/PaintChunk.h"
10 #include "platform/graphics/paint/PaintProperties.h" 10 #include "platform/graphics/paint/PaintChunkProperties.h"
11 #include "wtf/Vector.h" 11 #include "wtf/Vector.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 // Accepts information about changes to |PaintProperties| as drawings are 15 // Accepts information about changes to |PaintChunkProperties| as drawings are
16 // accumulated, and produces a series of paint chunks: contiguous ranges of the 16 // accumulated, and produces a series of paint chunks: contiguous ranges of the
17 // display list with identical |PaintProperties|. 17 // display list with identical |PaintChunkProperties|.
18 class PLATFORM_EXPORT PaintChunker { 18 class PLATFORM_EXPORT PaintChunker {
19 public: 19 public:
20 PaintChunker(); 20 PaintChunker();
21 ~PaintChunker(); 21 ~PaintChunker();
22 22
23 bool isInInitialState() const { return m_chunks.isEmpty() && m_currentProper ties == PaintProperties(); } 23 bool isInInitialState() const { return m_chunks.isEmpty() && m_currentProper ties == PaintChunkProperties(); }
24 24
25 void updateCurrentPaintProperties(const PaintProperties&); 25 void updateCurrentPaintChunkProperties(const PaintChunkProperties&);
26 26
27 void incrementDisplayItemIndex(); 27 void incrementDisplayItemIndex();
28 void decrementDisplayItemIndex(); 28 void decrementDisplayItemIndex();
29 29
30 // Releases the generated paint chunk list and resets the state of this 30 // Releases the generated paint chunk list and resets the state of this
31 // object. 31 // object.
32 Vector<PaintChunk> releasePaintChunks(); 32 Vector<PaintChunk> releasePaintChunks();
33 33
34 private: 34 private:
35 Vector<PaintChunk> m_chunks; 35 Vector<PaintChunk> m_chunks;
36 PaintProperties m_currentProperties; 36 PaintChunkProperties m_currentProperties;
37 }; 37 };
38 38
39 } // namespace blink 39 } // namespace blink
40 40
41 #endif // PaintChunker_h 41 #endif // PaintChunker_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698