Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/DisplayItemClient.h

Issue 2027333004: Handle uncommitted PaintController in DisplayItemClient aliveness tracking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "wtf/Assertions.h" 10 #include "wtf/Assertions.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 class PLATFORM_EXPORT DisplayItemClient { 58 class PLATFORM_EXPORT DisplayItemClient {
59 public: 59 public:
60 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS 60 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS
61 DisplayItemClient(); 61 DisplayItemClient();
62 virtual ~DisplayItemClient(); 62 virtual ~DisplayItemClient();
63 63
64 // Tests if this DisplayItemClient object has been created and has not been deleted yet. 64 // Tests if this DisplayItemClient object has been created and has not been deleted yet.
65 bool isAlive() const; 65 bool isAlive() const;
66 // Called when any DisplayItem of this DisplayItemClient is added into Paint Controller 66 // Called when any DisplayItem of this DisplayItemClient is added into Paint Controller
67 // using PaintController::createAndAppend(). 67 // using PaintController::createAndAppend().
68 void beginShouldKeepAlive(const void* owner) const; 68 void beginShouldKeepAlive(const void* paintController) const;
69 // Clears all should-keep-alive DisplayItemClients. Called after PaintContro ller commits 69 // Clears all should-keep-alive DisplayItemClients of a PaintController. Cal led after
70 // new display items. 70 // PaintController commits new display items.
71 static void endShouldKeepAliveAllClients(const void* owner); 71 static void endShouldKeepAliveAllClients(const void* paintController);
72 static void endShouldKeepAliveAllClients();
72 #else 73 #else
73 virtual ~DisplayItemClient() { } 74 virtual ~DisplayItemClient() { }
74 #endif 75 #endif
75 76
76 virtual String debugName() const = 0; 77 virtual String debugName() const = 0;
77 78
78 // The visual rect of this DisplayItemClient, in object space of the object that owns the GraphicsLayer, i.e. 79 // The visual rect of this DisplayItemClient, in object space of the object that owns the GraphicsLayer, i.e.
79 // offset by offsetFromLayoutObjectWithSubpixelAccumulation(). 80 // offset by offsetFromLayoutObjectWithSubpixelAccumulation().
80 virtual LayoutRect visualRect() const = 0; 81 virtual LayoutRect visualRect() const = 0;
81 82
(...skipping 12 matching lines...) Expand all
94 bool displayItemsAreCached(DisplayItemCacheGeneration) const final { return false; } \ 95 bool displayItemsAreCached(DisplayItemCacheGeneration) const final { return false; } \
95 void setDisplayItemsCached(DisplayItemCacheGeneration) const final { } \ 96 void setDisplayItemsCached(DisplayItemCacheGeneration) const final { } \
96 void setDisplayItemsUncached() const final { } 97 void setDisplayItemsUncached() const final { }
97 98
98 inline bool operator==(const DisplayItemClient& client1, const DisplayItemClient & client2) { return &client1 == &client2; } 99 inline bool operator==(const DisplayItemClient& client1, const DisplayItemClient & client2) { return &client1 == &client2; }
99 inline bool operator!=(const DisplayItemClient& client1, const DisplayItemClient & client2) { return &client1 != &client2; } 100 inline bool operator!=(const DisplayItemClient& client1, const DisplayItemClient & client2) { return &client1 != &client2; }
100 101
101 } // namespace blink 102 } // namespace blink
102 103
103 #endif // DisplayItemClient_h 104 #endif // DisplayItemClient_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698