Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
GMSlide Class Reference

#include <GMSlide.h>

Inheritance diagram for GMSlide:
Slide SkRefCnt SkRefCntBase

Public Member Functions

 GMSlide (std::unique_ptr< skiagm::GM > gm)
 
 ~GMSlide () override
 
SkISize getDimensions () const override
 
void gpuTeardown () override
 
void draw (SkCanvas *canvas) override
 
bool animate (double nanos) override
 
bool onChar (SkUnichar c) override
 
bool onGetControls (SkMetaData *) override
 
void onSetControls (const SkMetaData &) override
 
- Public Member Functions inherited from Slide
virtual SkISize getDimensions () const
 
virtual void gpuTeardown ()
 
virtual void draw (SkCanvas *canvas)=0
 
virtual bool animate (double nanos)
 
virtual void load (SkScalar winWidth, SkScalar winHeight)
 
virtual void resize (SkScalar winWidth, SkScalar winHeight)
 
virtual void unload ()
 
virtual bool onChar (SkUnichar c)
 
virtual bool onMouse (SkScalar x, SkScalar y, skui::InputState state, skui::ModifierKey modifiers)
 
virtual bool onGetControls (SkMetaData *)
 
virtual void onSetControls (const SkMetaData &)
 
const SkStringgetName ()
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Additional Inherited Members

- Protected Attributes inherited from Slide
SkString fName
 

Detailed Description

Definition at line 21 of file GMSlide.h.

Constructor & Destructor Documentation

◆ GMSlide()

GMSlide::GMSlide ( std::unique_ptr< skiagm::GM gm)

Definition at line 22 of file GMSlide.cpp.

22 : fGM(std::move(gm)) {
23 fGM->setMode(skiagm::GM::kSample_Mode);
24
25 fName.printf("GM_%s", fGM->getName().c_str());
26}
void printf(const char format[],...) SK_PRINTF_LIKE(2
Definition: SkString.cpp:534
SkString fName
Definition: Slide.h:54
@ kSample_Mode
Definition: gm.h:120

◆ ~GMSlide()

GMSlide::~GMSlide ( )
overridedefault

Member Function Documentation

◆ animate()

bool GMSlide::animate ( double  nanos)
overridevirtual

Reimplemented from Slide.

Definition at line 45 of file GMSlide.cpp.

45{ return fGM->animate(nanos); }

◆ draw()

void GMSlide::draw ( SkCanvas canvas)
overridevirtual

Implements Slide.

Definition at line 34 of file GMSlide.cpp.

34 {
35 SkString msg;
36
37 auto result = fGM->gpuSetup(canvas, &msg);
39 return;
40 }
41
42 fGM->draw(canvas, &msg);
43}
GAsyncResult * result

◆ getDimensions()

SkISize GMSlide::getDimensions ( ) const
inlineoverridevirtual

A slide may have a content dimensions that is independent of the current window size. An empty size indicates that the Slide's dimensions are equal to the window's dimensions.

Reimplemented from Slide.

Definition at line 26 of file GMSlide.h.

26{ return fGM->getISize(); }

◆ gpuTeardown()

void GMSlide::gpuTeardown ( )
overridevirtual

Reimplemented from Slide.

Definition at line 30 of file GMSlide.cpp.

30 {
31 fGM->gpuTeardown();
32}

◆ onChar()

bool GMSlide::onChar ( SkUnichar  c)
overridevirtual

Reimplemented from Slide.

Definition at line 47 of file GMSlide.cpp.

47{ return fGM->onChar(c); }

◆ onGetControls()

bool GMSlide::onGetControls ( SkMetaData controls)
overridevirtual

Reimplemented from Slide.

Definition at line 49 of file GMSlide.cpp.

49 {
50 return fGM->getControls(controls);
51}

◆ onSetControls()

void GMSlide::onSetControls ( const SkMetaData controls)
overridevirtual

Reimplemented from Slide.

Definition at line 53 of file GMSlide.cpp.

53 {
54 fGM->setControls(controls);
55}

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