OLD | NEW |
(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 |
OLD | NEW |