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

Public Member Functions

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

- 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 []
 
- 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 174 of file kawase_blur_rt.cpp.

Constructor & Destructor Documentation

◆ KawaseBlurRT()

KawaseBlurRT::KawaseBlurRT ( )
inline

Definition at line 176 of file kawase_blur_rt.cpp.

176{}

Member Function Documentation

◆ getISize()

SkISize KawaseBlurRT::getISize ( )
inlineoverridevirtual

Implements skiagm::GM.

Definition at line 178 of file kawase_blur_rt.cpp.

178{ return {1280, 768}; }

◆ getName()

SkString KawaseBlurRT::getName ( ) const
inlineoverridevirtual

Implements skiagm::GM.

Definition at line 177 of file kawase_blur_rt.cpp.

177{ return SkString("kawase_blur_rt"); }

◆ onDraw()

void KawaseBlurRT::onDraw ( SkCanvas canvas)
inlineoverridevirtual

Reimplemented from skiagm::GM.

Definition at line 184 of file kawase_blur_rt.cpp.

184 {
185 canvas->drawImage(fMandrill, 0, 0);
186 canvas->translate(256, 0);
187 KawaseBlurFilter blurFilter;
188 blurFilter.draw(canvas, fMandrill, 45);
189 canvas->translate(512, 0);
190 blurFilter.draw(canvas, fMandrill, 55);
191 }
void draw(SkCanvas *canvas, sk_sp< SkImage > input, int blurRadius)
void translate(SkScalar dx, SkScalar dy)
Definition: SkCanvas.cpp:1278
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
Definition: SkCanvas.h:1528

◆ onOnceBeforeDraw()

void KawaseBlurRT::onOnceBeforeDraw ( )
inlineoverridevirtual

Reimplemented from skiagm::GM.

Definition at line 180 of file kawase_blur_rt.cpp.

180 {
181 fMandrill = ToolUtils::GetResourceAsImage("images/mandrill_256.png");
182 }
sk_sp< SkImage > GetResourceAsImage(const char *resource)
Definition: DecodeUtils.h:25

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