Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
DM::DebugSink Class Reference

#include <DMSrcSink.h>

Inheritance diagram for DM::DebugSink:
DM::Sink

Public Member Functions

Result draw (const Src &, SkBitmap *, SkWStream *, SkString *) const override
 
const char * fileExtension () const override
 
SinkFlags flags () const override
 
- Public Member Functions inherited from DM::Sink
virtual ~Sink ()
 
virtual Result draw (const Src &, SkBitmap *, SkWStream *, SkString *log) const =0
 
virtual void setColorSpace (sk_sp< SkColorSpace >)
 
virtual bool serial () const
 
virtual const char * fileExtension () const =0
 
virtual SinkFlags flags () const =0
 
virtual SkColorInfo colorInfo () const
 

Detailed Description

Definition at line 546 of file DMSrcSink.h.

Member Function Documentation

◆ draw()

Result DM::DebugSink::draw ( const Src src,
SkBitmap ,
SkWStream dst,
SkString  
) const
overridevirtual

Implements DM::Sink.

Definition at line 2077 of file DMSrcSink.cpp.

2077 {
2078 DebugCanvas debugCanvas(src.size().width(), src.size().height());
2079 Result result = src.draw(&debugCanvas, /*GraphiteTestContext=*/nullptr);
2080 if (!result.isOk()) {
2081 return result;
2082 }
2083 std::unique_ptr<SkCanvas> nullCanvas = SkMakeNullCanvas();
2084 UrlDataManager dataManager(SkString("data"));
2086 writer.beginObject(); // root
2087 debugCanvas.toJSON(writer, dataManager, nullCanvas.get());
2088 writer.endObject(); // root
2089 writer.flush();
2090 return Result::Ok();
2091}
SK_API std::unique_ptr< SkCanvas > SkMakeNullCanvas()
static Result Ok()
Definition: DMSrcSink.h:50
GAsyncResult * result
dst
Definition: cp.py:12

◆ fileExtension()

const char * DM::DebugSink::fileExtension ( ) const
inlineoverridevirtual

Implements DM::Sink.

Definition at line 549 of file DMSrcSink.h.

549{ return "json"; }

◆ flags()

SinkFlags DM::DebugSink::flags ( ) const
inlineoverridevirtual

Implements DM::Sink.

Definition at line 550 of file DMSrcSink.h.

550{ return SinkFlags{ SinkFlags::kVector, SinkFlags::kDirect }; }

The documentation for this class was generated from the following files: