| OLD | NEW |
| 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" |
| 11 #include "platform/graphics/paint/PaintChunkProperties.h" | 11 #include "platform/graphics/paint/PaintChunkProperties.h" |
| 12 #include "wtf/Allocator.h" | 12 #include "wtf/Allocator.h" |
| 13 #include "wtf/AutoReset.h" |
| 13 #include "wtf/Noncopyable.h" | 14 #include "wtf/Noncopyable.h" |
| 14 #include "wtf/Vector.h" | 15 #include "wtf/Vector.h" |
| 15 | 16 |
| 16 namespace blink { | 17 namespace blink { |
| 17 | 18 |
| 18 // Accepts information about changes to |PaintChunkProperties| as drawings are | 19 // Accepts information about changes to |PaintChunkProperties| as drawings are |
| 19 // accumulated, and produces a series of paint chunks: contiguous ranges of the | 20 // accumulated, and produces a series of paint chunks: contiguous ranges of the |
| 20 // display list with identical |PaintChunkProperties|. | 21 // display list with identical |PaintChunkProperties|. |
| 21 class PLATFORM_EXPORT PaintChunker final { | 22 class PLATFORM_EXPORT PaintChunker final { |
| 22 DISALLOW_NEW(); | 23 DISALLOW_NEW(); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 // Item requires its own paint chunk. | 68 // Item requires its own paint chunk. |
| 68 RequiresSeparateChunk, | 69 RequiresSeparateChunk, |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 Vector<PaintChunk> m_chunks; | 72 Vector<PaintChunk> m_chunks; |
| 72 Vector<ItemBehavior> m_chunkBehavior; | 73 Vector<ItemBehavior> m_chunkBehavior; |
| 73 Optional<PaintChunk::Id> m_currentChunkId; | 74 Optional<PaintChunk::Id> m_currentChunkId; |
| 74 PaintChunkProperties m_currentProperties; | 75 PaintChunkProperties m_currentProperties; |
| 75 }; | 76 }; |
| 76 | 77 |
| 78 #if DCHECK_IS_ON() |
| 79 class DisableNullPaintPropertyChecks { |
| 80 STACK_ALLOCATED(); |
| 81 WTF_MAKE_NONCOPYABLE(DisableNullPaintPropertyChecks); |
| 82 |
| 83 public: |
| 84 DisableNullPaintPropertyChecks(); |
| 85 |
| 86 private: |
| 87 AutoReset<bool> m_disabler; |
| 88 }; |
| 89 #endif // DCHECK_IS_ON() |
| 90 |
| 77 } // namespace blink | 91 } // namespace blink |
| 78 | 92 |
| 79 #endif // PaintChunker_h | 93 #endif // PaintChunker_h |
| OLD | NEW |