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

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

Issue 1477213003: More switching to standard type traits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use std::is_convertible in threading traits Created 5 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 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // Provide a new set of paint chunk properties to apply to recorded display 63 // Provide a new set of paint chunk properties to apply to recorded display
64 // items, for Slimming Paint v2. 64 // items, for Slimming Paint v2.
65 void updateCurrentPaintChunkProperties(const PaintChunkProperties&); 65 void updateCurrentPaintChunkProperties(const PaintChunkProperties&);
66 66
67 // Retrieve the current paint properties. 67 // Retrieve the current paint properties.
68 const PaintChunkProperties& currentPaintChunkProperties() const; 68 const PaintChunkProperties& currentPaintChunkProperties() const;
69 69
70 template <typename DisplayItemClass, typename... Args> 70 template <typename DisplayItemClass, typename... Args>
71 void createAndAppend(Args&&... args) 71 void createAndAppend(Args&&... args)
72 { 72 {
73 static_assert(WTF::IsSubclass<DisplayItemClass, DisplayItem>::value, 73 static_assert(WTF::IsBaseOf<DisplayItem, DisplayItemClass>::value,
74 "Can only createAndAppend subclasses of DisplayItem."); 74 "Can only createAndAppend subclasses of DisplayItem.");
75 static_assert(sizeof(DisplayItemClass) <= kMaximumDisplayItemSize, 75 static_assert(sizeof(DisplayItemClass) <= kMaximumDisplayItemSize,
76 "DisplayItem subclass is larger than kMaximumDisplayItemSize."); 76 "DisplayItem subclass is larger than kMaximumDisplayItemSize.");
77 77
78 if (displayItemConstructionIsDisabled()) 78 if (displayItemConstructionIsDisabled())
79 return; 79 return;
80 DisplayItemClass& displayItem = m_newDisplayItemList.allocateAndConstruc t<DisplayItemClass>(WTF::forward<Args>(args)...); 80 DisplayItemClass& displayItem = m_newDisplayItemList.allocateAndConstruc t<DisplayItemClass>(WTF::forward<Args>(args)...);
81 processNewItem(displayItem); 81 processNewItem(displayItem);
82 } 82 }
83 83
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 // easily find where the duplicated ids are from. 263 // easily find where the duplicated ids are from.
264 DisplayItemIndicesByClientMap m_newDisplayItemIndicesByClient; 264 DisplayItemIndicesByClientMap m_newDisplayItemIndicesByClient;
265 #endif 265 #endif
266 266
267 OwnPtr<Vector<String>> m_trackedPaintInvalidationObjects; 267 OwnPtr<Vector<String>> m_trackedPaintInvalidationObjects;
268 }; 268 };
269 269
270 } // namespace blink 270 } // namespace blink
271 271
272 #endif // PaintController_h 272 #endif // PaintController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698