Changeset 195580 in webkit


Ignore:
Timestamp:
Jan 25, 2016 9:41:44 PM (8 years ago)
Author:
Simon Fraser
Message:

DisplayList items can log paths now
https://bugs.webkit.org/show_bug.cgi?id=153417

Reviewed by Zalan Bujtas.

Now that Path supports TextStream logging, clean up its output a little and
enable dumping of Paths in DisplayListItems.

  • platform/graphics/Path.cpp:

(WebCore::operator<<):

  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::operator<<):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r195577 r195580  
     12016-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
    1162016-01-25  Antti Koivisto  <antti@apple.com>
    217
  • trunk/Source/WebCore/platform/graphics/Path.cpp

    r195170 r195580  
    195195TextStream& operator<<(TextStream& stream, const Path& path)
    196196{
    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;
    201202        switch (element.type) {
    202203        case PathElementMoveToPoint: // The points member will contain 1 value.
    203             stream << " move to " << element.points[0];
     204            stream << "move to " << element.points[0];
    204205            break;
    205206        case PathElementAddLineToPoint: // The points member will contain 1 value.
    206             stream << " add line to " << element.points[0];
     207            stream << "add line to " << element.points[0];
    207208            break;
    208209        case PathElementAddQuadCurveToPoint: // The points member will contain 2 values.
    209             stream << " add quad curve to " << element.points[0] << " " << element.points[1];
     210            stream << "add quad curve to " << element.points[0] << " " << element.points[1];
    210211            break;
    211212        case PathElementAddCurveToPoint: // The points member will contain 3 values.
    212             stream << " add curve to " << element.points[0] << " " << element.points[1] << " " << element.points[2];
     213            stream << "add curve to " << element.points[0] << " " << element.points[1] << " " << element.points[2];
    213214            break;
    214215        case PathElementCloseSubpath: // The points member will contain no values.
    215             stream << " close subpath";
     216            stream << "close subpath";
    216217            break;
    217218        }
  • trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp

    r195539 r195580  
    327327}
    328328
    329 static TextStream& operator<<(TextStream& ts, const ClipOutToPath&)
    330 {
    331 //    ts.dumpProperty("path", item.path()); // FIXME: path logging.
     329static TextStream& operator<<(TextStream& ts, const ClipOutToPath& item)
     330{
     331    ts.dumpProperty("path", item.path());
    332332    return ts;
    333333}
     
    340340static TextStream& operator<<(TextStream& ts, const ClipPath& item)
    341341{
    342 //    ts.dumpProperty("path", item.path()); // FIXME: path logging.
     342    ts.dumpProperty("path", item.path());
    343343    ts.dumpProperty("wind-rule", item.windRule());
    344344    return ts;
     
    810810{
    811811    ts << static_cast<const DrawingItem&>(item);
    812 //    ts.dumpProperty("path", item.path()); // FIXME: path logging.
     812    ts.dumpProperty("path", item.path());
    813813    return ts;
    814814}
     
    864864{
    865865    ts << static_cast<const DrawingItem&>(item);
    866 //    ts.dumpProperty("path", item.path()); // FIXME: path logging.
     866    ts.dumpProperty("path", item.path());
    867867    return ts;
    868868}
Note: See TracChangeset for help on using the changeset viewer.