| 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 { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 PaintInvalidationBecameVisible, | 27 PaintInvalidationBecameVisible, |
| 28 PaintInvalidationBecameInvisible, | 28 PaintInvalidationBecameInvisible, |
| 29 PaintInvalidationScroll, | 29 PaintInvalidationScroll, |
| 30 PaintInvalidationSelection, | 30 PaintInvalidationSelection, |
| 31 PaintInvalidationOutline, | 31 PaintInvalidationOutline, |
| 32 PaintInvalidationSubtree, | 32 PaintInvalidationSubtree, |
| 33 PaintInvalidationLayoutObjectInsertion, | 33 PaintInvalidationLayoutObjectInsertion, |
| 34 PaintInvalidationLayoutObjectRemoval, | 34 PaintInvalidationLayoutObjectRemoval, |
| 35 PaintInvalidationSVGResourceChange, | 35 PaintInvalidationSVGResourceChange, |
| 36 PaintInvalidationBackgroundOnScrollingContentsLayer, | 36 PaintInvalidationBackgroundOnScrollingContentsLayer, |
| 37 PaintInvalidationCaret, |
| 37 PaintInvalidationForTesting, | 38 PaintInvalidationForTesting, |
| 38 // PaintInvalidationDelayedFull means that PaintInvalidationFull is needed in | 39 // PaintInvalidationDelayedFull means that PaintInvalidationFull is needed in |
| 39 // order to fully paint the content, but that painting of the object can be | 40 // order to fully paint the content, but that painting of the object can be |
| 40 // delayed until a future frame. This can be the case for an object whose | 41 // delayed until a future frame. This can be the case for an object whose |
| 41 // content is not visible to the user. | 42 // content is not visible to the user. |
| 42 PaintInvalidationDelayedFull, | 43 PaintInvalidationDelayedFull, |
| 43 | 44 |
| 44 PaintInvalidationReasonMax = PaintInvalidationDelayedFull | 45 PaintInvalidationReasonMax = PaintInvalidationDelayedFull |
| 45 }; | 46 }; |
| 46 | 47 |
| 47 PLATFORM_EXPORT const char* paintInvalidationReasonToString( | 48 PLATFORM_EXPORT const char* paintInvalidationReasonToString( |
| 48 PaintInvalidationReason); | 49 PaintInvalidationReason); |
| 49 | 50 |
| 50 inline bool isFullPaintInvalidationReason(PaintInvalidationReason reason) { | 51 inline bool isFullPaintInvalidationReason(PaintInvalidationReason reason) { |
| 51 return reason >= PaintInvalidationFull; | 52 return reason >= PaintInvalidationFull; |
| 52 } | 53 } |
| 53 | 54 |
| 54 inline bool isImmediateFullPaintInvalidationReason( | 55 inline bool isImmediateFullPaintInvalidationReason( |
| 55 PaintInvalidationReason reason) { | 56 PaintInvalidationReason reason) { |
| 56 return isFullPaintInvalidationReason(reason) && | 57 return isFullPaintInvalidationReason(reason) && |
| 57 reason != PaintInvalidationDelayedFull; | 58 reason != PaintInvalidationDelayedFull; |
| 58 } | 59 } |
| 59 | 60 |
| 60 } // namespace blink | 61 } // namespace blink |
| 61 | 62 |
| 62 #endif // PaintInvalidationReason_h | 63 #endif // PaintInvalidationReason_h |
| OLD | NEW |