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

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

Issue 2513893002: Make ifdefs consistent in WebKit/Source/core/ (Closed)
Patch Set: Fix build. Update after review. Created 4 years, 1 month 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 DisplayItem_h 5 #ifndef DisplayItem_h
6 #define DisplayItem_h 6 #define DisplayItem_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "platform/graphics/ContiguousContainer.h" 9 #include "platform/graphics/ContiguousContainer.h"
10 #include "platform/graphics/paint/DisplayItemClient.h" 10 #include "platform/graphics/paint/DisplayItemClient.h"
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 static bool isCacheableType(Type type) { 329 static bool isCacheableType(Type type) {
330 return isDrawingType(type) || type == kSubsequence; 330 return isDrawingType(type) || type == kSubsequence;
331 } 331 }
332 bool isCacheable() const { 332 bool isCacheable() const {
333 return !skippedCache() && isCacheableType(m_type); 333 return !skippedCache() && isCacheableType(m_type);
334 } 334 }
335 335
336 virtual bool isBegin() const { return false; } 336 virtual bool isBegin() const { return false; }
337 virtual bool isEnd() const { return false; } 337 virtual bool isEnd() const { return false; }
338 338
339 #if DCHECK_IS_ON() 339 #ifdef NDEBUG
340 virtual bool isEndAndPairedWith(DisplayItem::Type otherType) const { 340 virtual bool isEndAndPairedWith(DisplayItem::Type otherType) const {
341 return false; 341 return false;
342 } 342 }
343 #endif 343 #endif
344 344
345 virtual bool equals(const DisplayItem& other) const { 345 virtual bool equals(const DisplayItem& other) const {
346 return m_client == other.m_client && m_type == other.m_type && 346 return m_client == other.m_client && m_type == other.m_type &&
347 m_derivedSize == other.m_derivedSize && 347 m_derivedSize == other.m_derivedSize &&
348 m_skippedCache == other.m_skippedCache; 348 m_skippedCache == other.m_skippedCache;
349 } 349 }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 bool isBegin() const final { return true; } 411 bool isBegin() const final { return true; }
412 }; 412 };
413 413
414 class PLATFORM_EXPORT PairedEndDisplayItem : public DisplayItem { 414 class PLATFORM_EXPORT PairedEndDisplayItem : public DisplayItem {
415 protected: 415 protected:
416 PairedEndDisplayItem(const DisplayItemClient& client, 416 PairedEndDisplayItem(const DisplayItemClient& client,
417 Type type, 417 Type type,
418 size_t derivedSize) 418 size_t derivedSize)
419 : DisplayItem(client, type, derivedSize) {} 419 : DisplayItem(client, type, derivedSize) {}
420 420
421 #if ENABLE(ASSERT) 421 #ifdef NDEBUG
422 bool isEndAndPairedWith(DisplayItem::Type otherType) const override = 0; 422 bool isEndAndPairedWith(DisplayItem::Type otherType) const override = 0;
Alexander Alekseev 2016/11/18 22:32:15 This is declared in the base class only if NDEBUG
423 #endif 423 #endif
424 424
425 private: 425 private:
426 bool isEnd() const final { return true; } 426 bool isEnd() const final { return true; }
427 }; 427 };
428 428
429 } // namespace blink 429 } // namespace blink
430 430
431 #endif // DisplayItem_h 431 #endif // DisplayItem_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698