Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
skiagm::CropImageFilterGM Class Reference
Inheritance diagram for skiagm::CropImageFilterGM:
skiagm::GM

Public Member Functions

 CropImageFilterGM (SkTileMode inputMode, SkTileMode outputMode)
 
- 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 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
 

Protected Member Functions

SkISize getISize () override
 
SkString getName () const 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 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 337 of file crop_imagefilter.cpp.

Constructor & Destructor Documentation

◆ CropImageFilterGM()

skiagm::CropImageFilterGM::CropImageFilterGM ( SkTileMode  inputMode,
SkTileMode  outputMode 
)
inline

Definition at line 339 of file crop_imagefilter.cpp.

340 : fInputMode(inputMode)
341 , fOutputMode(outputMode) {}

Member Function Documentation

◆ getISize()

SkISize skiagm::CropImageFilterGM::getISize ( )
inlineoverrideprotectedvirtual

Implements skiagm::GM.

Definition at line 344 of file crop_imagefilter.cpp.

344 {
345 return {SkScalarRoundToInt(4.f * (kExampleBounds.fRight + 1.f) - 1.f),
346 SkScalarRoundToInt(5.f * (kExampleBounds.fBottom + 1.f) - 1.f)};
347 }
#define SkScalarRoundToInt(x)
Definition SkScalar.h:37

◆ getName()

SkString skiagm::CropImageFilterGM::getName ( ) const
inlineoverrideprotectedvirtual

Implements skiagm::GM.

Definition at line 348 of file crop_imagefilter.cpp.

348 {
349 SkString name("crop_imagefilter_");
350 switch(fInputMode) {
351 case SkTileMode::kDecal: name.append("decal"); break;
352 case SkTileMode::kClamp: name.append("clamp"); break;
353 case SkTileMode::kRepeat: name.append("repeat"); break;
354 case SkTileMode::kMirror: name.append("mirror"); break;
355 }
356 name.append("-in_");
357
358 switch (fOutputMode) {
359 case SkTileMode::kDecal: name.append("decal"); break;
360 case SkTileMode::kClamp: name.append("clamp"); break;
361 case SkTileMode::kRepeat: name.append("repeat"); break;
362 case SkTileMode::kMirror: name.append("mirror"); break;
363 }
364 name.append("-out");
365 return name;
366 }
const char * name
Definition fuchsia.cc:50

◆ onDraw()

void skiagm::CropImageFilterGM::onDraw ( SkCanvas canvas)
inlineoverrideprotectedvirtual

Reimplemented from skiagm::GM.

Definition at line 368 of file crop_imagefilter.cpp.

368 {
369 draw_example_grid(canvas, fInputMode, fOutputMode);
370 }

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