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/RuntimeEnabledFeatures.h" | 8 #include "platform/RuntimeEnabledFeatures.h" |
9 #include "platform/geometry/IntRect.h" | 9 #include "platform/geometry/IntRect.h" |
10 #include "platform/geometry/Region.h" | 10 #include "platform/geometry/Region.h" |
11 #include "platform/graphics/PaintInvalidationReason.h" | 11 #include "platform/graphics/PaintInvalidationReason.h" |
12 #include "platform/graphics/paint/PaintRecord.h" | 12 #include "platform/graphics/paint/PaintRecord.h" |
13 #include "platform/json/JSONValues.h" | 13 #include "platform/json/JSONValues.h" |
14 #include "platform/wtf/Allocator.h" | 14 #include "platform/wtf/Allocator.h" |
15 #include "platform/wtf/text/WTFString.h" | 15 #include "platform/wtf/text/WTFString.h" |
16 #include "third_party/skia/include/core/SkColor.h" | 16 #include "third_party/skia/include/core/SkColor.h" |
17 | 17 |
18 namespace blink { | 18 namespace blink { |
19 | 19 |
20 class DisplayItemClient; | 20 class DisplayItemClient; |
21 | 21 |
22 struct RasterInvalidationInfo { | 22 struct RasterInvalidationInfo { |
23 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 23 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
24 // This is for comparison only. Don't dereference because the client may have | 24 // This is for comparison only. Don't dereference because the client may have |
25 // died. | 25 // died. |
26 const DisplayItemClient* client = nullptr; | 26 const DisplayItemClient* client = nullptr; |
27 String client_debug_name; | 27 String client_debug_name; |
28 IntRect rect; | 28 IntRect rect; |
29 PaintInvalidationReason reason = kPaintInvalidationFull; | 29 PaintInvalidationReason reason = PaintInvalidationReason::kFull; |
30 }; | 30 }; |
31 | 31 |
32 inline bool operator==(const RasterInvalidationInfo& a, | 32 inline bool operator==(const RasterInvalidationInfo& a, |
33 const RasterInvalidationInfo& b) { | 33 const RasterInvalidationInfo& b) { |
34 return a.rect == b.rect; | 34 return a.rect == b.rect; |
35 } | 35 } |
36 | 36 |
37 struct UnderRasterInvalidation { | 37 struct UnderRasterInvalidation { |
38 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 38 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
39 int x; | 39 int x; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 83 |
84 private: | 84 private: |
85 typedef HashMap<TargetClass*, RasterInvalidationTracking> | 85 typedef HashMap<TargetClass*, RasterInvalidationTracking> |
86 InvalidationTrackingMap; | 86 InvalidationTrackingMap; |
87 InvalidationTrackingMap map_; | 87 InvalidationTrackingMap map_; |
88 }; | 88 }; |
89 | 89 |
90 } // namespace blink | 90 } // namespace blink |
91 | 91 |
92 #endif // RasterInvalidationTracking_h | 92 #endif // RasterInvalidationTracking_h |
OLD | NEW |