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

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

Issue 2176573004: Enable subsequence caching for spv2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@CachePaintProperties
Patch Set: Fix compilation error on Windows Created 4 years, 4 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/DisplayItem.h" 9 #include "platform/graphics/paint/DisplayItem.h"
10 #include "platform/graphics/paint/PaintChunk.h" 10 #include "platform/graphics/paint/PaintChunk.h"
(...skipping 15 matching lines...) Expand all
26 ~PaintChunker(); 26 ~PaintChunker();
27 27
28 bool isInInitialState() const { return m_chunks.isEmpty() && m_currentProper ties == PaintChunkProperties(); } 28 bool isInInitialState() const { return m_chunks.isEmpty() && m_currentProper ties == PaintChunkProperties(); }
29 29
30 const PaintChunkProperties& currentPaintChunkProperties() const { return m_c urrentProperties; } 30 const PaintChunkProperties& currentPaintChunkProperties() const { return m_c urrentProperties; }
31 void updateCurrentPaintChunkProperties(const PaintChunk::Id*, const PaintChu nkProperties&); 31 void updateCurrentPaintChunkProperties(const PaintChunk::Id*, const PaintChu nkProperties&);
32 32
33 void incrementDisplayItemIndex(const DisplayItem&); 33 void incrementDisplayItemIndex(const DisplayItem&);
34 void decrementDisplayItemIndex(); 34 void decrementDisplayItemIndex();
35 35
36 const PaintChunk& lastChunk() const { return m_chunks.last(); }
37
36 void clear(); 38 void clear();
37 39
38 // Releases the generated paint chunk list and resets the state of this 40 // Releases the generated paint chunk list and resets the state of this
39 // object. 41 // object.
40 Vector<PaintChunk> releasePaintChunks(); 42 Vector<PaintChunk> releasePaintChunks();
41 43
42 private: 44 private:
43 enum ItemBehavior { 45 enum ItemBehavior {
44 // Can be combined with adjacent items when building chunks. 46 // Can be combined with adjacent items when building chunks.
45 DefaultBehavior = 0, 47 DefaultBehavior = 0,
46 48
47 // Item requires its own paint chunk. 49 // Item requires its own paint chunk.
48 RequiresSeparateChunk, 50 RequiresSeparateChunk,
49 }; 51 };
50 52
51 Vector<PaintChunk> m_chunks; 53 Vector<PaintChunk> m_chunks;
52 Vector<ItemBehavior> m_chunkBehavior; 54 Vector<ItemBehavior> m_chunkBehavior;
53 Optional<PaintChunk::Id> m_currentChunkId; 55 Optional<PaintChunk::Id> m_currentChunkId;
54 PaintChunkProperties m_currentProperties; 56 PaintChunkProperties m_currentProperties;
55 }; 57 };
56 58
57 } // namespace blink 59 } // namespace blink
58 60
59 #endif // PaintChunker_h 61 #endif // PaintChunker_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698