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

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

Issue 2807923002: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/graphics (Closed)
Patch Set: rebase and fix Created 3 years, 8 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "platform/graphics/paint/DisplayItemList.h" 5 #include "platform/graphics/paint/DisplayItemList.h"
6 6
7 #include "platform/graphics/LoggingCanvas.h" 7 #include "platform/graphics/LoggingCanvas.h"
8 #include "platform/graphics/paint/DrawingDisplayItem.h" 8 #include "platform/graphics/paint/DrawingDisplayItem.h"
9 #include "platform/graphics/paint/PaintChunk.h" 9 #include "platform/graphics/paint/PaintChunk.h"
10 #include "third_party/skia/include/core/SkPictureAnalyzer.h" 10 #include "third_party/skia/include/core/SkPictureAnalyzer.h"
11 11
12 #ifndef NDEBUG 12 #ifndef NDEBUG
13 #include "platform/wtf/text/WTFString.h" 13 #include "platform/wtf/text/WTFString.h"
14 #endif 14 #endif
15 15
16 namespace blink { 16 namespace blink {
17 17
18 DisplayItem& DisplayItemList::AppendByMoving(DisplayItem& item) { 18 DisplayItem& DisplayItemList::AppendByMoving(DisplayItem& item) {
19 #ifndef NDEBUG 19 #ifndef NDEBUG
20 String original_debug_string = item.AsDebugString(); 20 String original_debug_string = item.AsDebugString();
21 #endif 21 #endif
22 ASSERT(item.HasValidClient()); 22 DCHECK(item.HasValidClient());
23 DisplayItem& result = 23 DisplayItem& result =
24 ContiguousContainer::AppendByMoving(item, item.DerivedSize()); 24 ContiguousContainer::AppendByMoving(item, item.DerivedSize());
25 // ContiguousContainer::appendByMoving() calls an in-place constructor 25 // ContiguousContainer::appendByMoving() calls an in-place constructor
26 // on item which replaces it with a tombstone/"dead display item" that 26 // on item which replaces it with a tombstone/"dead display item" that
27 // can be safely destructed but should never be used. 27 // can be safely destructed but should never be used.
28 ASSERT(!item.HasValidClient()); 28 DCHECK(!item.HasValidClient());
29 #ifndef NDEBUG 29 #ifndef NDEBUG
30 // Save original debug string in the old item to help debugging. 30 // Save original debug string in the old item to help debugging.
31 item.SetClientDebugString(original_debug_string); 31 item.SetClientDebugString(original_debug_string);
32 #endif 32 #endif
33 return result; 33 return result;
34 } 34 }
35 35
36 void DisplayItemList::AppendVisualRect(const IntRect& visual_rect) { 36 void DisplayItemList::AppendVisualRect(const IntRect& visual_rect) {
37 visual_rects_.push_back(visual_rect); 37 visual_rects_.push_back(visual_rect);
38 } 38 }
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 String::Format("[%d,%d %dx%d]", local_visual_rect.X(), 106 String::Format("[%d,%d %dx%d]", local_visual_rect.X(),
107 local_visual_rect.Y(), local_visual_rect.Width(), 107 local_visual_rect.Y(), local_visual_rect.Width(),
108 local_visual_rect.Height())); 108 local_visual_rect.Height()));
109 } 109 }
110 json_array->PushObject(std::move(json)); 110 json_array->PushObject(std::move(json));
111 } 111 }
112 return json_array; 112 return json_array;
113 } 113 }
114 114
115 } // namespace blink 115 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698