OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 PaintInvalidationReason_h | 5 #ifndef PaintInvalidationReason_h |
6 #define PaintInvalidationReason_h | 6 #define PaintInvalidationReason_h |
7 | 7 |
8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
11 | 11 |
12 enum PaintInvalidationReason { | 12 enum PaintInvalidationReason { |
13 PaintInvalidationNone, | 13 PaintInvalidationNone, |
| 14 PaintInvalidationProbablyNone, |
14 PaintInvalidationIncremental, | 15 PaintInvalidationIncremental, |
15 PaintInvalidationRectangle, | 16 PaintInvalidationRectangle, |
16 // The following reasons will all cause full invalidation of the LayoutObjec
t. | 17 // The following reasons will all cause full invalidation of the LayoutObjec
t. |
17 PaintInvalidationFull, // Any unspecified reason of full invalidation. | 18 PaintInvalidationFull, // Any unspecified reason of full invalidation. |
18 PaintInvalidationStyleChange, | 19 PaintInvalidationStyleChange, |
19 PaintInvalidationForcedByLayout, | 20 PaintInvalidationForcedByLayout, |
20 PaintInvalidationCompositingUpdate, | 21 PaintInvalidationCompositingUpdate, |
21 PaintInvalidationBorderBoxChange, | 22 PaintInvalidationBorderBoxChange, |
22 PaintInvalidationContentBoxChange, | 23 PaintInvalidationContentBoxChange, |
23 PaintInvalidationLayoutOverflowBoxChange, | 24 PaintInvalidationLayoutOverflowBoxChange, |
(...skipping 17 matching lines...) Expand all Loading... |
41 PaintInvalidationReasonMax = PaintInvalidationDelayedFull | 42 PaintInvalidationReasonMax = PaintInvalidationDelayedFull |
42 }; | 43 }; |
43 | 44 |
44 PLATFORM_EXPORT const char* paintInvalidationReasonToString(PaintInvalidationRea
son); | 45 PLATFORM_EXPORT const char* paintInvalidationReasonToString(PaintInvalidationRea
son); |
45 | 46 |
46 inline bool isFullPaintInvalidationReason(PaintInvalidationReason reason) | 47 inline bool isFullPaintInvalidationReason(PaintInvalidationReason reason) |
47 { | 48 { |
48 return reason >= PaintInvalidationFull; | 49 return reason >= PaintInvalidationFull; |
49 } | 50 } |
50 | 51 |
| 52 inline bool isImmediateFullPaintInvalidationReason(PaintInvalidationReason reaso
n) |
| 53 { |
| 54 return isFullPaintInvalidationReason(reason) && reason != PaintInvalidationD
elayedFull; |
| 55 } |
| 56 |
51 } // namespace blink | 57 } // namespace blink |
52 | 58 |
53 #endif // PaintInvalidationReason_h | 59 #endif // PaintInvalidationReason_h |
OLD | NEW |