Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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 void setColorSpace (sk_sp< SkColorSpace >)
 
virtual bool serial () const
 
virtual SkColorInfo colorInfo () const
 

Detailed Description

Definition at line 537 of file DMSrcSink.h.

Constructor & Destructor Documentation

◆ SKPSink()

DM::SKPSink::SKPSink ( )

Definition at line 2059 of file DMSrcSink.cpp.

2059{}

Member Function Documentation

◆ draw()

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

Implements DM::Sink.

Definition at line 2061 of file DMSrcSink.cpp.

2061 {
2062 auto size = SkSize::Make(src.size());
2063 SkPictureRecorder recorder;
2064 Result result = src.draw(recorder.beginRecording(size.width(), size.height()),
2065 /*GraphiteTestContext=*/nullptr);
2066 if (!result.isOk()) {
2067 return result;
2068 }
2070 recorder.finishRecordingAsPicture()->serialize(dst, &procs);
2071 return Result::Ok();
2072}
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
GAsyncResult * result
static SkSerialProcs serial_procs_using_png()
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
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: