Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
FilterGM Class Reference
Inheritance diagram for FilterGM:
skiagm::GM

Public Member Functions

 FilterGM ()
 
- 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
 

Public Attributes

sk_sp< SkImagefImg32
 
sk_sp< SkImagefImg4444
 
sk_sp< SkImagefImg565
 

Protected Member Functions

SkString getName () const override
 
SkISize getISize () override
 
void onDraw (SkCanvas *canvas) override
 
- 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
 

Additional Inherited Members

- Public Types inherited from skiagm::GM
enum  Mode { kGM_Mode , kSample_Mode , kBench_Mode }
 
using DrawResult = skiagm::DrawResult
 
using GraphiteTestContext = skiatest::graphite::GraphiteTestContext
 
- Static Public Attributes inherited from skiagm::GM
static constexpr char kErrorMsg_DrawSkippedGpuOnly []
 

Detailed Description

Definition at line 76 of file bitmapfilters.cpp.

Constructor & Destructor Documentation

◆ FilterGM()

FilterGM::FilterGM ( )
inline

Definition at line 91 of file bitmapfilters.cpp.

91 {
92 this->setBGColor(0xFFDDDDDD);
93 }
void setBGColor(SkColor)
Definition: gm.cpp:159

Member Function Documentation

◆ getISize()

SkISize FilterGM::getISize ( )
inlineoverrideprotectedvirtual

Implements skiagm::GM.

Definition at line 98 of file bitmapfilters.cpp.

98{ return SkISize::Make(540, 250); }
static constexpr SkISize Make(int32_t w, int32_t h)
Definition: SkSize.h:20

◆ getName()

SkString FilterGM::getName ( ) const
inlineoverrideprotectedvirtual

Implements skiagm::GM.

Definition at line 96 of file bitmapfilters.cpp.

96{ return SkString("bitmapfilters"); }

◆ onDraw()

void FilterGM::onDraw ( SkCanvas canvas)
inlineoverrideprotectedvirtual

Reimplemented from skiagm::GM.

Definition at line 100 of file bitmapfilters.cpp.

100 {
103
104 canvas->translate(x, y);
105 y = draw_row(canvas, fImg4444);
106 canvas->translate(0, y);
107 y = draw_row(canvas, fImg565);
108 canvas->translate(0, y);
109 draw_row(canvas, fImg32);
110 }
#define SkIntToScalar(x)
Definition: SkScalar.h:57
static SkScalar draw_row(SkCanvas *canvas, sk_sp< SkImage > img)
sk_sp< SkImage > fImg32
sk_sp< SkImage > fImg565
sk_sp< SkImage > fImg4444
void translate(SkScalar dx, SkScalar dy)
Definition: SkCanvas.cpp:1278
float SkScalar
Definition: extension.cpp:12
double y
double x

Member Data Documentation

◆ fImg32

sk_sp<SkImage> FilterGM::fImg32

Definition at line 89 of file bitmapfilters.cpp.

◆ fImg4444

sk_sp<SkImage> FilterGM::fImg4444

Definition at line 89 of file bitmapfilters.cpp.

◆ fImg565

sk_sp<SkImage> FilterGM::fImg565

Definition at line 89 of file bitmapfilters.cpp.


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