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

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_base_of 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // Provide a new set of paint chunk properties to apply to recorded display 62 // Provide a new set of paint chunk properties to apply to recorded display
63 // items, for Slimming Paint v2. 63 // items, for Slimming Paint v2.
64 void updateCurrentPaintChunkProperties(const PaintChunkProperties&); 64 void updateCurrentPaintChunkProperties(const PaintChunkProperties&);
65 65
66 // Retrieve the current paint properties. 66 // Retrieve the current paint properties.
67 const PaintChunkProperties& currentPaintChunkProperties() const; 67 const PaintChunkProperties& currentPaintChunkProperties() const;
68 68
69 template <typename DisplayItemClass, typename... Args> 69 template <typename DisplayItemClass, typename... Args>
70 void createAndAppend(Args&&... args) 70 void createAndAppend(Args&&... args)
71 { 71 {
72 static_assert(WTF::IsSubclass<DisplayItemClass, DisplayItem>::value, 72 static_assert(std::is_base_of<DisplayItem, DisplayItemClass>::value,
73 "Can only createAndAppend subclasses of DisplayItem."); 73 "Can only createAndAppend subclasses of DisplayItem.");
74 static_assert(sizeof(DisplayItemClass) <= kMaximumDisplayItemSize, 74 static_assert(sizeof(DisplayItemClass) <= kMaximumDisplayItemSize,
75 "DisplayItem subclass is larger than kMaximumDisplayItemSize."); 75 "DisplayItem subclass is larger than kMaximumDisplayItemSize.");
76 76
77 if (displayItemConstructionIsDisabled()) 77 if (displayItemConstructionIsDisabled())
78 return; 78 return;
79 DisplayItemClass& displayItem = m_newDisplayItemList.allocateAndConstruc t<DisplayItemClass>(WTF::forward<Args>(args)...); 79 DisplayItemClass& displayItem = m_newDisplayItemList.allocateAndConstruc t<DisplayItemClass>(WTF::forward<Args>(args)...);
80 processNewItem(displayItem); 80 processNewItem(displayItem);
81 } 81 }
82 82
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 // easily find where the duplicated ids are from. 262 // easily find where the duplicated ids are from.
263 DisplayItemIndicesByClientMap m_newDisplayItemIndicesByClient; 263 DisplayItemIndicesByClientMap m_newDisplayItemIndicesByClient;
264 #endif 264 #endif
265 265
266 OwnPtr<Vector<String>> m_trackedPaintInvalidationObjects; 266 OwnPtr<Vector<String>> m_trackedPaintInvalidationObjects;
267 }; 267 };
268 268
269 } // namespace blink 269 } // namespace blink
270 270
271 #endif // PaintController_h 271 #endif // PaintController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698