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

Side by Side Diff: Source/platform/graphics/paint/DisplayItem.cpp

Issue 1317143005: [WIP] do something :-) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « Source/platform/fonts/FontDescription.cpp ('k') | Source/platform/heap/HeapTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "config.h" 5 #include "config.h"
6 #include "platform/graphics/paint/DisplayItem.h" 6 #include "platform/graphics/paint/DisplayItem.h"
7 7
8 #include "wtf/SizeAssertions.h"
9
8 namespace blink { 10 namespace blink {
9 11
10 struct SameSizeAsDisplayItem { 12 ASSERT_SIZE(DisplayItem, 16, 24);
11 virtual ~SameSizeAsDisplayItem() { } // Allocate vtable pointer.
12 void* pointer;
13 int ints[2]; // Make sure other fields are packed into two ints.
14 #ifndef NDEBUG
15 WTF::String m_debugString;
16 #endif
17 };
18 static_assert(sizeof(DisplayItem) == sizeof(SameSizeAsDisplayItem), "DisplayItem should stay small");
19 13
20 #ifndef NDEBUG 14 #ifndef NDEBUG
21 15
22 static WTF::String paintPhaseAsDebugString(int paintPhase) 16 static WTF::String paintPhaseAsDebugString(int paintPhase)
23 { 17 {
24 // Must be kept in sync with PaintPhase. 18 // Must be kept in sync with PaintPhase.
25 switch (paintPhase) { 19 switch (paintPhase) {
26 case 0: return "PaintPhaseBlockBackground"; 20 case 0: return "PaintPhaseBlockBackground";
27 case 1: return "PaintPhaseChildBlockBackground"; 21 case 1: return "PaintPhaseChildBlockBackground";
28 case 2: return "PaintPhaseChildBlockBackgrounds"; 22 case 2: return "PaintPhaseChildBlockBackgrounds";
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 stringBuilder.append('"'); 219 stringBuilder.append('"');
226 if (m_skippedCache) 220 if (m_skippedCache)
227 stringBuilder.append(", skippedCache: true"); 221 stringBuilder.append(", skippedCache: true");
228 if (m_scope) 222 if (m_scope)
229 stringBuilder.append(String::format(", scope: %d", m_scope)); 223 stringBuilder.append(String::format(", scope: %d", m_scope));
230 } 224 }
231 225
232 #endif 226 #endif
233 227
234 } // namespace blink 228 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/fonts/FontDescription.cpp ('k') | Source/platform/heap/HeapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698