Flutter Engine
The Flutter Engine
Public Types | Public Member Functions | List of all members
skiagm::SimpleGM Class Reference

#include <gm.h>

Inheritance diagram for skiagm::SimpleGM:
skiagm::GM

Public Types

using DrawProc = DrawResult(*)(SkCanvas *, SkString *)
 
- Public Types inherited from skiagm::GM
enum  Mode { kGM_Mode , kSample_Mode , kBench_Mode }
 
using DrawResult = skiagm::DrawResult
 
using GraphiteTestContext = skiatest::graphite::GraphiteTestContext
 

Public Member Functions

 SimpleGM (SkColor bgColor, const SkString &name, const SkISize &size, DrawProc drawProc)
 
SkString getName () const override
 
SkISize getISize () override
 
- Public Member Functions inherited from skiagm::GM
 GM (SkColor backgroundColor=SK_ColorWHITE)
 
virtual ~GM ()
 
void setMode (Mode mode)
 
Mode getMode () const
 
DrawResult gpuSetup (SkCanvas *, SkString *errorMsg, GraphiteTestContext *=nullptr)
 
void gpuTeardown ()
 
void onceBeforeDraw ()
 
DrawResult draw (SkCanvas *canvas)
 
DrawResult draw (SkCanvas *, SkString *errorMsg)
 
void drawBackground (SkCanvas *)
 
DrawResult drawContent (SkCanvas *canvas)
 
DrawResult drawContent (SkCanvas *, SkString *errorMsg)
 
virtual SkISize getISize ()=0
 
virtual SkString getName () const =0
 
virtual bool runAsBench () const
 
SkScalar width ()
 
SkScalar height ()
 
SkColor getBGColor () const
 
void setBGColor (SkColor)
 
void drawSizeBounds (SkCanvas *, SkColor)
 
bool animate (double)
 
virtual bool onChar (SkUnichar)
 
bool getControls (SkMetaData *controls)
 
void setControls (const SkMetaData &controls)
 
virtual void modifyGrContextOptions (GrContextOptions *)
 
virtual void modifyGraphiteContextOptions (skgpu::graphite::ContextOptions *) const
 
virtual bool isBazelOnly () const
 
virtual std::map< std::string, std::string > getGoldKeys () const
 

Additional Inherited Members

- Static Public Attributes inherited from skiagm::GM
static constexpr char kErrorMsg_DrawSkippedGpuOnly []
 
- Protected Member Functions inherited from skiagm::GM
virtual DrawResult onGpuSetup (SkCanvas *, SkString *, GraphiteTestContext *)
 
virtual void onGpuTeardown ()
 
virtual void onOnceBeforeDraw ()
 
virtual DrawResult onDraw (SkCanvas *, SkString *errorMsg)
 
virtual void onDraw (SkCanvas *)
 
virtual bool onAnimate (double)
 
virtual bool onGetControls (SkMetaData *)
 
virtual void onSetControls (const SkMetaData &)
 
GraphiteTestContextgraphiteTestContext () const
 

Detailed Description

Definition at line 276 of file gm.h.

Member Typedef Documentation

◆ DrawProc

Definition at line 278 of file gm.h.

Constructor & Destructor Documentation

◆ SimpleGM()

skiagm::SimpleGM::SimpleGM ( SkColor  bgColor,
const SkString name,
const SkISize size,
DrawProc  drawProc 
)
inline

Definition at line 280 of file gm.h.

281 : GM(bgColor), fName(name), fSize(size), fDrawProc(drawProc) {}
static const SkColor bgColor
Definition: BlurTest.cpp:59
GM(SkColor backgroundColor=SK_ColorWHITE)
Definition: gm.cpp:81
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32
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

Member Function Documentation

◆ getISize()

SkISize SimpleGM::getISize ( )
overridevirtual

Implements skiagm::GM.

Definition at line 145 of file gm.cpp.

145{ return fSize; }

◆ getName()

SkString SimpleGM::getName ( ) const
overridevirtual

Implements skiagm::GM.

Definition at line 146 of file gm.cpp.

146{ return fName; }

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