Changeset 195580 in webkit
- Timestamp:
- Jan 25, 2016 9:41:44 PM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r195577 r195580 1 2016-01-25 Simon Fraser <simon.fraser@apple.com> 2 3 DisplayList items can log paths now 4 https://bugs.webkit.org/show_bug.cgi?id=153417 5 6 Reviewed by Zalan Bujtas. 7 8 Now that Path supports TextStream logging, clean up its output a little and 9 enable dumping of Paths in DisplayListItems. 10 11 * platform/graphics/Path.cpp: 12 (WebCore::operator<<): 13 * platform/graphics/displaylists/DisplayListItems.cpp: 14 (WebCore::DisplayList::operator<<): 15 1 16 2016-01-25 Antti Koivisto <antti@apple.com> 2 17 -
trunk/Source/WebCore/platform/graphics/Path.cpp
r195170 r195580 195 195 TextStream& operator<<(TextStream& stream, const Path& path) 196 196 { 197 TextStream::GroupScope group(stream); 198 stream << "path " << &path; 199 200 path.apply([&stream](const PathElement& element) { 197 bool isFirst = true; 198 path.apply([&stream, &isFirst](const PathElement& element) { 199 if (!isFirst) 200 stream << ", "; 201 isFirst = false; 201 202 switch (element.type) { 202 203 case PathElementMoveToPoint: // The points member will contain 1 value. 203 stream << " 204 stream << "move to " << element.points[0]; 204 205 break; 205 206 case PathElementAddLineToPoint: // The points member will contain 1 value. 206 stream << " 207 stream << "add line to " << element.points[0]; 207 208 break; 208 209 case PathElementAddQuadCurveToPoint: // The points member will contain 2 values. 209 stream << " 210 stream << "add quad curve to " << element.points[0] << " " << element.points[1]; 210 211 break; 211 212 case PathElementAddCurveToPoint: // The points member will contain 3 values. 212 stream << " 213 stream << "add curve to " << element.points[0] << " " << element.points[1] << " " << element.points[2]; 213 214 break; 214 215 case PathElementCloseSubpath: // The points member will contain no values. 215 stream << " 216 stream << "close subpath"; 216 217 break; 217 218 } -
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp
r195539 r195580 327 327 } 328 328 329 static TextStream& operator<<(TextStream& ts, const ClipOutToPath& )330 { 331 // ts.dumpProperty("path", item.path()); // FIXME: path logging. 329 static TextStream& operator<<(TextStream& ts, const ClipOutToPath& item) 330 { 331 ts.dumpProperty("path", item.path()); 332 332 return ts; 333 333 } … … 340 340 static TextStream& operator<<(TextStream& ts, const ClipPath& item) 341 341 { 342 // ts.dumpProperty("path", item.path()); // FIXME: path logging. 342 ts.dumpProperty("path", item.path()); 343 343 ts.dumpProperty("wind-rule", item.windRule()); 344 344 return ts; … … 810 810 { 811 811 ts << static_cast<const DrawingItem&>(item); 812 // ts.dumpProperty("path", item.path()); // FIXME: path logging. 812 ts.dumpProperty("path", item.path()); 813 813 return ts; 814 814 } … … 864 864 { 865 865 ts << static_cast<const DrawingItem&>(item); 866 // ts.dumpProperty("path", item.path()); // FIXME: path logging. 866 ts.dumpProperty("path", item.path()); 867 867 return ts; 868 868 }
Note: See TracChangeset
for help on using the changeset viewer.