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

#include <DMSrcSink.h>

Inheritance diagram for DM::SKPSink:
DM::Sink

Public Member Functions

 SKPSink ()
 
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 537 of file DMSrcSink.h.

Constructor & Destructor Documentation

◆ SKPSink()

DM::SKPSink::SKPSink ( )

Definition at line 2060 of file DMSrcSink.cpp.

2060{}

Member Function Documentation

◆ draw()

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

Implements DM::Sink.

Definition at line 2062 of file DMSrcSink.cpp.

2062 {
2063 auto size = SkSize::Make(src.size());
2064 SkPictureRecorder recorder;
2065 Result result = src.draw(recorder.beginRecording(size.width(), size.height()),
2066 /*GraphiteTestContext=*/nullptr);
2067 if (!result.isOk()) {
2068 return result;
2069 }
2071 recorder.finishRecordingAsPicture()->serialize(dst, &procs);
2072 return Result::Ok();
2073}
static Result Ok()
Definition: DMSrcSink.h:50
SkCanvas * beginRecording(const SkRect &bounds, sk_sp< SkBBoxHierarchy > bbh)
sk_sp< SkPicture > finishRecordingAsPicture()
sk_sp< SkData > serialize(const SkSerialProcs *procs=nullptr) const
Definition: SkPicture.cpp:249
GAsyncResult * result
static SkSerialProcs serial_procs_using_png()
Definition: DMSrcSink.cpp:2050
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259
dst
Definition: cp.py:12
static constexpr SkSize Make(SkScalar w, SkScalar h)
Definition: SkSize.h:56

◆ fileExtension()

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

Implements DM::Sink.

Definition at line 542 of file DMSrcSink.h.

542{ return "skp"; }

◆ flags()

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

Implements DM::Sink.

Definition at line 543 of file DMSrcSink.h.

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

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