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

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

Issue 2186643002: Fold compositing display items into contained drawings if the drawing is a singleton. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: none Created 4 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 PaintController_h 5 #ifndef PaintController_h
6 #define PaintController_h 6 #define PaintController_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "platform/RuntimeEnabledFeatures.h" 9 #include "platform/RuntimeEnabledFeatures.h"
10 #include "platform/geometry/IntRect.h" 10 #include "platform/geometry/IntRect.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // appends the cached display item to the new display list and returns true. Otherwise returns false. 101 // appends the cached display item to the new display list and returns true. Otherwise returns false.
102 bool useCachedDrawingIfPossible(const DisplayItemClient&, DisplayItem::Type) ; 102 bool useCachedDrawingIfPossible(const DisplayItemClient&, DisplayItem::Type) ;
103 103
104 // Tries to find the cached subsequence corresponding to the given parameter s. If found, copies the 104 // Tries to find the cached subsequence corresponding to the given parameter s. If found, copies the
105 // cache subsequence to the new display list and returns true. Otherwise ret urns false. 105 // cache subsequence to the new display list and returns true. Otherwise ret urns false.
106 bool useCachedSubsequenceIfPossible(const DisplayItemClient&); 106 bool useCachedSubsequenceIfPossible(const DisplayItemClient&);
107 107
108 // True if the last display item is a begin that doesn't draw content. 108 // True if the last display item is a begin that doesn't draw content.
109 bool lastDisplayItemIsNoopBegin() const; 109 bool lastDisplayItemIsNoopBegin() const;
110 void removeLastDisplayItem(); 110 void removeLastDisplayItem();
111 const DisplayItem* lastDisplayItem(unsigned offset);
wkorman 2016/07/26 18:41:08 Perhaps worth documenting the lifespan of the item
111 112
112 void beginSkippingCache() { ++m_skippingCacheCount; } 113 void beginSkippingCache() { ++m_skippingCacheCount; }
113 void endSkippingCache() { DCHECK(m_skippingCacheCount > 0); --m_skippingCach eCount; } 114 void endSkippingCache() { DCHECK(m_skippingCacheCount > 0); --m_skippingCach eCount; }
114 bool isSkippingCache() const { return m_skippingCacheCount; } 115 bool isSkippingCache() const { return m_skippingCacheCount; }
115 116
116 // Must be called when a painting is finished. 117 // Must be called when a painting is finished.
117 // offsetFromLayoutObject is the offset between the space of the GraphicsLay er which owns this 118 // offsetFromLayoutObject is the offset between the space of the GraphicsLay er which owns this
118 // PaintController and the coordinate space of the owning LayoutObject. 119 // PaintController and the coordinate space of the owning LayoutObject.
119 void commitNewDisplayItems(const LayoutSize& offsetFromLayoutObject = Layout Size()); 120 void commitNewDisplayItems(const LayoutSize& offsetFromLayoutObject = Layout Size());
120 121
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 277
277 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS 278 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS
278 // A stack recording subsequence clients that are currently painting. 279 // A stack recording subsequence clients that are currently painting.
279 Vector<const DisplayItemClient*> m_currentSubsequenceClients; 280 Vector<const DisplayItemClient*> m_currentSubsequenceClients;
280 #endif 281 #endif
281 }; 282 };
282 283
283 } // namespace blink 284 } // namespace blink
284 285
285 #endif // PaintController_h 286 #endif // PaintController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698