| 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 #include "platform/graphics/paint/PaintChunker.h" | 5 #include "platform/graphics/paint/PaintChunker.h" |
| 6 | 6 |
| 7 #include "platform/RuntimeEnabledFeatures.h" | 7 #include "platform/RuntimeEnabledFeatures.h" |
| 8 | 8 |
| 9 namespace blink { | 9 namespace blink { |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 #if DCHECK_IS_ON() | 35 #if DCHECK_IS_ON() |
| 36 if (!gNullPaintPropertyChecksDisabled) { | 36 if (!gNullPaintPropertyChecksDisabled) { |
| 37 // Property nodes should never be null because they should either be set to | 37 // Property nodes should never be null because they should either be set to |
| 38 // properties created by a LayoutObject/FrameView, or be set to a non-null | 38 // properties created by a LayoutObject/FrameView, or be set to a non-null |
| 39 // root node. If these DCHECKs are hit we are missing a call to update the | 39 // root node. If these DCHECKs are hit we are missing a call to update the |
| 40 // properties. See: ScopedPaintChunkProperties. | 40 // properties. See: ScopedPaintChunkProperties. |
| 41 DCHECK(m_currentProperties.propertyTreeState.transform()); | 41 DCHECK(m_currentProperties.propertyTreeState.transform()); |
| 42 DCHECK(m_currentProperties.propertyTreeState.clip()); | 42 DCHECK(m_currentProperties.propertyTreeState.clip()); |
| 43 DCHECK(m_currentProperties.propertyTreeState.effect()); | 43 DCHECK(m_currentProperties.propertyTreeState.effect()); |
| 44 DCHECK(m_currentProperties.propertyTreeState.scroll()); | |
| 45 } | 44 } |
| 46 #endif | 45 #endif |
| 47 | 46 |
| 48 ItemBehavior behavior; | 47 ItemBehavior behavior; |
| 49 Optional<PaintChunk::Id> newChunkId; | 48 Optional<PaintChunk::Id> newChunkId; |
| 50 if (DisplayItem::isForeignLayerType(item.getType())) { | 49 if (DisplayItem::isForeignLayerType(item.getType())) { |
| 51 behavior = RequiresSeparateChunk; | 50 behavior = RequiresSeparateChunk; |
| 52 // Use null chunkId if we are skipping cache, so that the chunk will not | 51 // Use null chunkId if we are skipping cache, so that the chunk will not |
| 53 // match any old chunk and will be treated as brand new. | 52 // match any old chunk and will be treated as brand new. |
| 54 if (!item.skippedCache()) | 53 if (!item.skippedCache()) |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 Vector<PaintChunk> PaintChunker::releasePaintChunks() { | 112 Vector<PaintChunk> PaintChunker::releasePaintChunks() { |
| 114 Vector<PaintChunk> chunks; | 113 Vector<PaintChunk> chunks; |
| 115 chunks.swap(m_chunks); | 114 chunks.swap(m_chunks); |
| 116 m_chunkBehavior.clear(); | 115 m_chunkBehavior.clear(); |
| 117 m_currentChunkId = WTF::nullopt; | 116 m_currentChunkId = WTF::nullopt; |
| 118 m_currentProperties = PaintChunkProperties(); | 117 m_currentProperties = PaintChunkProperties(); |
| 119 return chunks; | 118 return chunks; |
| 120 } | 119 } |
| 121 | 120 |
| 122 } // namespace blink | 121 } // namespace blink |
| OLD | NEW |