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

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

Issue 2549553002: Verify paintedOutputOfObjectHasNoEffectRegardlessOfSize during painting (Closed)
Patch Set: - Created 4 years 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 "platform/graphics/PaintInvalidationReason.h" 10 #include "platform/graphics/PaintInvalidationReason.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 virtual ~DisplayItemClient() {} 48 virtual ~DisplayItemClient() {}
49 #endif 49 #endif
50 50
51 virtual String debugName() const = 0; 51 virtual String debugName() const = 0;
52 52
53 // The visual rect of this DisplayItemClient, in the object space of the 53 // The visual rect of this DisplayItemClient, in the object space of the
54 // object that owns the GraphicsLayer, i.e. offset by 54 // object that owns the GraphicsLayer, i.e. offset by
55 // offsetFromLayoutObjectWithSubpixelAccumulation(). 55 // offsetFromLayoutObjectWithSubpixelAccumulation().
56 virtual LayoutRect visualRect() const = 0; 56 virtual LayoutRect visualRect() const = 0;
57 57
58 // This is declared here instead of in LayoutObject for verifying the
59 // condition in DrawingRecorder.
60 // Returns true if the object itself will not generate any effective painted
61 // output no matter what size the object is. For example, this function can
62 // return false for an object whose size is currently 0x0 but would have
63 // effective painted output if it was set a non-empty size. It's used to skip
64 // unforced paint invalidation of LayoutObjects (which is when
65 // shouldDoFullPaintInvalidation is false, but mayNeedPaintInvalidation or
66 // childShouldCheckForPaintInvalidation is true) to avoid unnecessary paint
67 // invalidations of empty areas covered by such objects.
68 virtual bool paintedOutputOfObjectHasNoEffectRegardlessOfSize() const {
chrishtr 2016/12/05 21:21:12 Remove this method from LayoutObject?
Xianzhu 2016/12/05 21:29:15 Done.
69 return false;
70 }
71
58 void setDisplayItemsUncached( 72 void setDisplayItemsUncached(
59 PaintInvalidationReason reason = PaintInvalidationFull) const { 73 PaintInvalidationReason reason = PaintInvalidationFull) const {
60 m_cacheGenerationOrInvalidationReason.invalidate(reason); 74 m_cacheGenerationOrInvalidationReason.invalidate(reason);
61 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS 75 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS
62 // Clear should-keep-alive of DisplayItemClients in a subsequence if this 76 // Clear should-keep-alive of DisplayItemClients in a subsequence if this
63 // object is a subsequence. 77 // object is a subsequence.
64 endShouldKeepAliveAllClients(this); 78 endShouldKeepAliveAllClients(this);
65 #endif 79 #endif
66 } 80 }
67 81
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 return &client1 == &client2; 178 return &client1 == &client2;
165 } 179 }
166 inline bool operator!=(const DisplayItemClient& client1, 180 inline bool operator!=(const DisplayItemClient& client1,
167 const DisplayItemClient& client2) { 181 const DisplayItemClient& client2) {
168 return &client1 != &client2; 182 return &client1 != &client2;
169 } 183 }
170 184
171 } // namespace blink 185 } // namespace blink
172 186
173 #endif // DisplayItemClient_h 187 #endif // DisplayItemClient_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698