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

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

Issue 1812153002: Move DisplayItemList complex inline method implementations to .cpp. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to head. Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h
diff --git a/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h b/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h
index aaeb5c2be5dc4539cbcb109f82708612fd9d0f48..c06a17110a54ee452c571af90f0b0e2164444f74 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h
+++ b/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h
@@ -11,10 +11,6 @@
#include "wtf/Alignment.h"
#include "wtf/Assertions.h"
-#ifndef NDEBUG
-#include "wtf/text/WTFString.h"
-#endif
-
namespace blink {
struct PaintChunk;
@@ -45,24 +41,7 @@ public:
return *this;
}
- DisplayItem& appendByMoving(DisplayItem& item, const IntRect& visualRect)
- {
-#ifndef NDEBUG
- WTF::String originalDebugString = item.asDebugString();
-#endif
- ASSERT(item.hasValidClient());
- DisplayItem& result = ContiguousContainer::appendByMoving(item, item.derivedSize());
- // ContiguousContainer::appendByMoving() calls an in-place constructor
- // on item which replaces it with a tombstone/"dead display item" that
- // can be safely destructed but should never be used.
- ASSERT(!item.hasValidClient());
-#ifndef NDEBUG
- // Save original debug string in the old item to help debugging.
- item.setClientDebugString(originalDebugString);
-#endif
- appendVisualRect(visualRect);
- return result;
- }
+ DisplayItem& appendByMoving(DisplayItem&, const IntRect& visualRect);
IntRect visualRect(unsigned index) const
{
@@ -73,16 +52,7 @@ public:
void appendVisualRect(const IntRect& visualRect);
#if ENABLE(ASSERT)
- void assertDisplayItemClientsAreAlive() const
- {
- for (auto& item : *this) {
-#ifdef NDEBUG
- DCHECK(DisplayItemClient::isAlive(item.client())) << "Short-lived DisplayItemClient. See crbug.com/570030.";
-#else
- DCHECK(DisplayItemClient::isAlive(item.client())) << "Short-lived DisplayItemClient: " << item.clientDebugString() << ". See crbug.com/570030.";
-#endif
- }
- }
+ void assertDisplayItemClientsAreAlive() const;
#endif
// Useful for iterating with a range-based for loop.
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698