OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 DisplayItemClient_h | 5 #ifndef DisplayItemClient_h |
6 #define DisplayItemClient_h | 6 #define DisplayItemClient_h |
7 | 7 |
8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
9 #include "platform/geometry/LayoutRect.h" | 9 #include "platform/geometry/LayoutRect.h" |
10 #include "platform/graphics/PaintInvalidationReason.h" | 10 #include "platform/graphics/PaintInvalidationReason.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 void beginShouldKeepAlive(const void* owner) const; | 34 void beginShouldKeepAlive(const void* owner) const; |
35 | 35 |
36 // Called when the DisplayItemClient is sure that it can safely die before i
ts owners | 36 // Called when the DisplayItemClient is sure that it can safely die before i
ts owners |
37 // have chance to remove it from the aliveness control. | 37 // have chance to remove it from the aliveness control. |
38 void endShouldKeepAlive() const; | 38 void endShouldKeepAlive() const; |
39 | 39 |
40 // Clears all should-keep-alive DisplayItemClients of a PaintController. Cal
led after | 40 // Clears all should-keep-alive DisplayItemClients of a PaintController. Cal
led after |
41 // PaintController commits new display items or the subsequence owner is inv
alidated. | 41 // PaintController commits new display items or the subsequence owner is inv
alidated. |
42 static void endShouldKeepAliveAllClients(const void* owner); | 42 static void endShouldKeepAliveAllClients(const void* owner); |
43 static void endShouldKeepAliveAllClients(); | 43 static void endShouldKeepAliveAllClients(); |
| 44 #else |
| 45 virtual ~DisplayItemClient() { } |
44 #endif | 46 #endif |
45 | 47 |
46 virtual String debugName() const = 0; | 48 virtual String debugName() const = 0; |
47 | 49 |
48 // The visual rect of this DisplayItemClient, in object space of the object
that owns the GraphicsLayer, i.e. | 50 // The visual rect of this DisplayItemClient, in object space of the object
that owns the GraphicsLayer, i.e. |
49 // offset by offsetFromLayoutObjectWithSubpixelAccumulation(). | 51 // offset by offsetFromLayoutObjectWithSubpixelAccumulation(). |
50 virtual LayoutRect visualRect() const = 0; | 52 virtual LayoutRect visualRect() const = 0; |
51 | 53 |
52 void setDisplayItemsUncached(PaintInvalidationReason reason = PaintInvalidat
ionFull) const | 54 void setDisplayItemsUncached(PaintInvalidationReason reason = PaintInvalidat
ionFull) const |
53 { | 55 { |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 120 |
119 mutable CacheGenerationOrInvalidationReason m_cacheGenerationOrInvalidationR
eason; | 121 mutable CacheGenerationOrInvalidationReason m_cacheGenerationOrInvalidationR
eason; |
120 }; | 122 }; |
121 | 123 |
122 inline bool operator==(const DisplayItemClient& client1, const DisplayItemClient
& client2) { return &client1 == &client2; } | 124 inline bool operator==(const DisplayItemClient& client1, const DisplayItemClient
& client2) { return &client1 == &client2; } |
123 inline bool operator!=(const DisplayItemClient& client1, const DisplayItemClient
& client2) { return &client1 != &client2; } | 125 inline bool operator!=(const DisplayItemClient& client1, const DisplayItemClient
& client2) { return &client1 != &client2; } |
124 | 126 |
125 } // namespace blink | 127 } // namespace blink |
126 | 128 |
127 #endif // DisplayItemClient_h | 129 #endif // DisplayItemClient_h |
OLD | NEW |