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

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

Issue 2031623002: Track DisplayItemClient aliveness for each PaintController (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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/paint/DisplayItemClient.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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; 68 void beginShouldKeepAlive(const void* owner) const;
69 // Clears all should-keep-alive DisplayItemClients. Called after PaintContro ller commits 69 // Clears all should-keep-alive DisplayItemClients. Called after PaintContro ller commits
70 // new display items. 70 // new display items.
71 static void endShouldKeepAliveAllClients(); 71 static void endShouldKeepAliveAllClients(const void* owner);
72 #else 72 #else
73 virtual ~DisplayItemClient() { } 73 virtual ~DisplayItemClient() { }
74 #endif 74 #endif
75 75
76 virtual String debugName() const = 0; 76 virtual String debugName() const = 0;
77 77
78 // The visual rect of this DisplayItemClient, in object space of the object that owns the GraphicsLayer, i.e. 78 // The visual rect of this DisplayItemClient, in object space of the object that owns the GraphicsLayer, i.e.
79 // offset by offsetFromLayoutObjectWithSubpixelAccumulation(). 79 // offset by offsetFromLayoutObjectWithSubpixelAccumulation().
80 virtual LayoutRect visualRect() const = 0; 80 virtual LayoutRect visualRect() const = 0;
81 81
(...skipping 12 matching lines...) Expand all
94 bool displayItemsAreCached(DisplayItemCacheGeneration) const final { return false; } \ 94 bool displayItemsAreCached(DisplayItemCacheGeneration) const final { return false; } \
95 void setDisplayItemsCached(DisplayItemCacheGeneration) const final { } \ 95 void setDisplayItemsCached(DisplayItemCacheGeneration) const final { } \
96 void setDisplayItemsUncached() const final { } 96 void setDisplayItemsUncached() const final { }
97 97
98 inline bool operator==(const DisplayItemClient& client1, const DisplayItemClient & client2) { return &client1 == &client2; } 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 100
101 } // namespace blink 101 } // namespace blink
102 102
103 #endif // DisplayItemClient_h 103 #endif // DisplayItemClient_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/paint/DisplayItemClient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698