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

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

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

Powered by Google App Engine
This is Rietveld 408576698