Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
SkValidationUtils.h File Reference
#include "include/core/SkBitmap.h"
#include "include/core/SkBlendMode.h"

Go to the source code of this file.

Functions

static bool SkIsValidMode (SkBlendMode mode)
 
static bool SkIsValidIRect (const SkIRect &rect)
 
static bool SkIsValidRect (const SkRect &rect)
 

Function Documentation

◆ SkIsValidIRect()

static bool SkIsValidIRect ( const SkIRect rect)
inlinestatic

Returns true if the rect's dimensions are between 0 and SK_MaxS32

Definition at line 22 of file SkValidationUtils.h.

22 {
23 return rect.width() >= 0 && rect.height() >= 0;
24}
sk_sp< SkBlender > blender SkRect rect
Definition SkRecords.h:350

◆ SkIsValidMode()

static bool SkIsValidMode ( SkBlendMode  mode)
inlinestatic

Returns true if mode's value is in the SkBlendMode enum.

Definition at line 16 of file SkValidationUtils.h.

16 {
17 return (unsigned)mode <= (unsigned)SkBlendMode::kLastMode;
18}
@ kLastMode
last valid value
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 mode
Definition switches.h:228

◆ SkIsValidRect()

static bool SkIsValidRect ( const SkRect rect)
inlinestatic

Returns true if the rect's dimensions are between 0 and SK_ScalarMax

Definition at line 28 of file SkValidationUtils.h.

28 {
29 return (rect.fLeft <= rect.fRight) &&
30 (rect.fTop <= rect.fBottom) &&
31 SkIsFinite(rect.width(), rect.height());
32}
static bool SkIsFinite(T x, Pack... values)