OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 PaintInvalidator_h |
| 6 #define PaintInvalidator_h |
| 7 |
| 8 #include "core/layout/PaintInvalidationState.h" |
| 9 #include "wtf/Optional.h" |
| 10 #include "wtf/Vector.h" |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 class FrameView; |
| 15 class LayoutObject; |
| 16 struct PaintPropertyTreeBuilderContext; |
| 17 |
| 18 // TODO(wangxianzhu): Move applicable PaintInvalidationState code into PaintInva
lidator. |
| 19 using PaintInvalidatorContext = PaintInvalidationState; |
| 20 |
| 21 class PaintInvalidator { |
| 22 public: |
| 23 // TODO(wangxianzhu): Avoid Optional<> by using copy-and-update pattern for
PaintInvalidatorContext. |
| 24 void invalidatePaintIfNeeded(FrameView&, const PaintPropertyTreeBuilderConte
xt&, Optional<PaintInvalidatorContext>&); |
| 25 void invalidatePaintIfNeeded(const LayoutObject&, const PaintPropertyTreeBui
lderContext&, const PaintInvalidatorContext&, Optional<PaintInvalidatorContext>&
); |
| 26 |
| 27 // Process objects needing paint invalidation on the next frame. |
| 28 // See the definition of PaintInvalidationDelayedFull for more details. |
| 29 void processPendingDelayedPaintInvalidations(); |
| 30 |
| 31 private: |
| 32 Vector<const LayoutObject*> m_pendingDelayedPaintInvalidations; |
| 33 }; |
| 34 |
| 35 } // namespace blink |
| 36 |
| 37 #endif // PaintInvalidator_h |
OLD | NEW |