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

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

Issue 1397583002: Implement the framework for a paint property hierarchy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Job insecurity: better tests, better comments, better names. Created 5 years, 2 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 DisplayItemList_h 5 #ifndef DisplayItemList_h
6 #define DisplayItemList_h 6 #define DisplayItemList_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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 void invalidateAll(); 71 void invalidateAll();
72 72
73 // Record when paint offsets change during paint. 73 // Record when paint offsets change during paint.
74 void invalidatePaintOffset(const DisplayItemClientWrapper&); 74 void invalidatePaintOffset(const DisplayItemClientWrapper&);
75 #if ENABLE(ASSERT) 75 #if ENABLE(ASSERT)
76 bool paintOffsetWasInvalidated(DisplayItemClient) const; 76 bool paintOffsetWasInvalidated(DisplayItemClient) const;
77 #endif 77 #endif
78 78
79 // These methods are called during painting. 79 // These methods are called during painting.
80 80
81 // Provide a new set of paint properties to apply to recorded display items, 81 // Provide a new set of paint chunk properties to apply to recorded display
82 // for Slimming Paint v2. 82 // items, for Slimming Paint v2.
83 void updateCurrentPaintProperties(const PaintProperties&); 83 // TODO(pdr): This should be moved to PaintArtifact.
84 void updateCurrentPaintChunkProperties(const PaintChunkProperties&);
84 85
85 template <typename DisplayItemClass, typename... Args> 86 template <typename DisplayItemClass, typename... Args>
86 void createAndAppend(Args&&... args) 87 void createAndAppend(Args&&... args)
87 { 88 {
88 static_assert(WTF::IsSubclass<DisplayItemClass, DisplayItem>::value, 89 static_assert(WTF::IsSubclass<DisplayItemClass, DisplayItem>::value,
89 "Can only createAndAppend subclasses of DisplayItem."); 90 "Can only createAndAppend subclasses of DisplayItem.");
90 static_assert(sizeof(DisplayItemClass) <= kMaximumDisplayItemSize, 91 static_assert(sizeof(DisplayItemClass) <= kMaximumDisplayItemSize,
91 "DisplayItem subclass is larger than kMaximumDisplayItemSize."); 92 "DisplayItem subclass is larger than kMaximumDisplayItemSize.");
92 93
93 if (displayItemConstructionIsDisabled()) 94 if (displayItemConstructionIsDisabled())
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 // the duplicated ids are from. 294 // the duplicated ids are from.
294 DisplayItemIndicesByClientMap m_newDisplayItemIndicesByClient; 295 DisplayItemIndicesByClientMap m_newDisplayItemIndicesByClient;
295 #endif 296 #endif
296 297
297 OwnPtr<Vector<String>> m_trackedPaintInvalidationObjects; 298 OwnPtr<Vector<String>> m_trackedPaintInvalidationObjects;
298 }; 299 };
299 300
300 } // namespace blink 301 } // namespace blink
301 302
302 #endif // DisplayItemList_h 303 #endif // DisplayItemList_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698