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

#include <DMSrcSink.h>

Inheritance diagram for DM::GPUSlugSink:
DM::GPUSink DM::Sink

Public Member Functions

 GPUSlugSink (const SkCommandLineConfigGpu *, const GrContextOptions &)
 
Result draw (const Src &, SkBitmap *, SkWStream *, SkString *) const override
 
- Public Member Functions inherited from DM::GPUSink
 GPUSink (const SkCommandLineConfigGpu *, const GrContextOptions &)
 
Result draw (const Src &, SkBitmap *, SkWStream *, SkString *) const override
 
Result onDraw (const Src &, SkBitmap *, SkWStream *, SkString *, const GrContextOptions &baseOptions, std::function< void(GrDirectContext *)> initContext=nullptr, std::function< SkCanvas *(SkCanvas *)> wrapCanvas=nullptr) const
 
skgpu::ContextType contextType () const
 
const sk_gpu_test::GrContextFactory::ContextOverridescontextOverrides () const
 
SkCommandLineConfigGpu::SurfType surfType () const
 
bool serial () const override
 
const char * fileExtension () const override
 
SinkFlags flags () const override
 
const GrContextOptionsbaseContextOptions () const
 
void setColorSpace (sk_sp< SkColorSpace > colorSpace) override
 
SkColorInfo colorInfo () 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
 

Additional Inherited Members

- Protected Member Functions inherited from DM::GPUSink
sk_sp< SkSurfacecreateDstSurface (GrDirectContext *, SkISize size) const
 
bool readBack (SkSurface *, SkBitmap *dst) const
 

Detailed Description

Definition at line 414 of file DMSrcSink.h.

Constructor & Destructor Documentation

◆ GPUSlugSink()

DM::GPUSlugSink::GPUSlugSink ( const SkCommandLineConfigGpu config,
const GrContextOptions options 
)

Definition at line 1647 of file DMSrcSink.cpp.

1648 : GPUSink(config, options) {}
const char * options
GPUSink(const SkCommandLineConfigGpu *, const GrContextOptions &)
Definition: DMSrcSink.cpp:1523

Member Function Documentation

◆ draw()

Result DM::GPUSlugSink::draw ( const Src src,
SkBitmap dst,
SkWStream write,
SkString log 
) const
overridevirtual

Reimplemented from DM::GPUSink.

Definition at line 1650 of file DMSrcSink.cpp.

1650 {
1651 GrContextOptions grOptions = this->baseContextOptions();
1652 // Force padded atlas entries for slug drawing.
1653 grOptions.fSupportBilerpFromGlyphAtlas |= true;
1654
1656
1657 return onDraw(src, dst, write, log, grOptions, nullptr,
1658 [&](SkCanvas* canvas){
1659 testCanvas.init(canvas);
1660 return testCanvas.get();
1661 });
1662}
Result onDraw(const Src &, SkBitmap *, SkWStream *, SkString *, const GrContextOptions &baseOptions, std::function< void(GrDirectContext *)> initContext=nullptr, std::function< SkCanvas *(SkCanvas *)> wrapCanvas=nullptr) const
Definition: DMSrcSink.cpp:1584
const GrContextOptions & baseContextOptions() const
Definition: DMSrcSink.h:389
T * init(Args &&... args)
Definition: SkTLazy.h:45
T * get()
Definition: SkTLazy.h:83
dst
Definition: cp.py:12
void write(SkWStream *wStream, const T &text)
Definition: skqp.cpp:188

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