| Index: third_party/WebKit/Source/core/paint/BoxPaintInvalidator.h
|
| diff --git a/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.h b/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8ab4a212c35b0a2f427538b59fd54a1c8883d992
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.h
|
| @@ -0,0 +1,44 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef BoxPaintInvalidator_h
|
| +#define BoxPaintInvalidator_h
|
| +
|
| +#include "platform/graphics/PaintInvalidationReason.h"
|
| +#include "wtf/Allocator.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class LayoutBox;
|
| +class LayoutRect;
|
| +class LayoutSize;
|
| +struct PaintInvalidatorContext;
|
| +
|
| +class BoxPaintInvalidator {
|
| + STACK_ALLOCATED();
|
| +public:
|
| + BoxPaintInvalidator(const LayoutBox& box, const PaintInvalidatorContext& context)
|
| + : m_box(box), m_context(context) { }
|
| +
|
| + static void boxWillBeDestroyed(const LayoutBox&);
|
| +
|
| + PaintInvalidationReason invalidatePaintIfNeeded();
|
| +
|
| +private:
|
| + PaintInvalidationReason computePaintInvalidationReason();
|
| +
|
| + void incrementallyInvalidatePaint();
|
| + void invalidatePaintRectClippedByOldAndNewBounds(const LayoutRect&);
|
| +
|
| + bool needsToSavePreviousBoxSizes();
|
| + void savePreviousBoxSizesIfNeeded();
|
| + LayoutSize computePreviousBorderBoxSize(const LayoutSize& previousBoundsSize);
|
| +
|
| + const LayoutBox& m_box;
|
| + const PaintInvalidatorContext& m_context;
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif
|
|
|