OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 RasterInvalidationTracking_h | 5 #ifndef RasterInvalidationTracking_h |
6 #define RasterInvalidationTracking_h | 6 #define RasterInvalidationTracking_h |
7 | 7 |
8 #include "platform/geometry/IntRect.h" | 8 #include "platform/geometry/IntRect.h" |
9 #include "platform/geometry/Region.h" | 9 #include "platform/geometry/Region.h" |
10 #include "platform/graphics/PaintInvalidationReason.h" | 10 #include "platform/graphics/PaintInvalidationReason.h" |
11 #include "platform/json/JSONValues.h" | 11 #include "platform/json/JSONValues.h" |
12 #include "third_party/skia/include/core/SkColor.h" | 12 #include "third_party/skia/include/core/SkColor.h" |
13 #include "third_party/skia/include/core/SkPicture.h" | 13 #include "third_party/skia/include/core/SkPicture.h" |
14 #include "wtf/Allocator.h" | 14 #include "wtf/Allocator.h" |
15 #include "wtf/text/WTFString.h" | 15 #include "wtf/text/WTFString.h" |
16 | 16 |
17 namespace blink { | 17 namespace blink { |
18 | 18 |
19 class DisplayItemClient; | 19 class DisplayItemClient; |
20 | 20 |
21 struct RasterInvalidationInfo { | 21 struct RasterInvalidationInfo { |
22 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 22 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
23 // This is for comparison only. Don't dereference because the client may have
died. | 23 // This is for comparison only. Don't dereference because the client may have |
| 24 // died. |
24 const DisplayItemClient* client; | 25 const DisplayItemClient* client; |
25 String clientDebugName; | 26 String clientDebugName; |
26 IntRect rect; | 27 IntRect rect; |
27 PaintInvalidationReason reason; | 28 PaintInvalidationReason reason; |
28 RasterInvalidationInfo() : reason(PaintInvalidationFull) {} | 29 RasterInvalidationInfo() : reason(PaintInvalidationFull) {} |
29 }; | 30 }; |
30 | 31 |
31 inline bool operator==(const RasterInvalidationInfo& a, | 32 inline bool operator==(const RasterInvalidationInfo& a, |
32 const RasterInvalidationInfo& b) { | 33 const RasterInvalidationInfo& b) { |
33 return a.rect == b.rect; | 34 return a.rect == b.rect; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 | 82 |
82 private: | 83 private: |
83 typedef HashMap<TargetClass*, RasterInvalidationTracking> | 84 typedef HashMap<TargetClass*, RasterInvalidationTracking> |
84 InvalidationTrackingMap; | 85 InvalidationTrackingMap; |
85 InvalidationTrackingMap m_invalidationTrackingMap; | 86 InvalidationTrackingMap m_invalidationTrackingMap; |
86 }; | 87 }; |
87 | 88 |
88 } // namespace blink | 89 } // namespace blink |
89 | 90 |
90 #endif // RasterInvalidationTracking_h | 91 #endif // RasterInvalidationTracking_h |
OLD | NEW |