Flutter Engine
The Flutter Engine
Functions
SkMallocPixelRef.cpp File Reference
#include "include/core/SkMallocPixelRef.h"
#include "include/core/SkAlphaType.h"
#include "include/core/SkColorType.h"
#include "include/core/SkData.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkPixelRef.h"
#include "include/private/base/SkMalloc.h"
#include <utility>

Go to the source code of this file.

Functions

static bool is_valid (const SkImageInfo &info)
 

Function Documentation

◆ is_valid()

static bool is_valid ( const SkImageInfo info)
static

Definition at line 19 of file SkMallocPixelRef.cpp.

19 {
20 if (info.width() < 0 || info.height() < 0 ||
21 (unsigned)info.colorType() > (unsigned)kLastEnum_SkColorType ||
22 (unsigned)info.alphaType() > (unsigned)kLastEnum_SkAlphaType)
23 {
24 return false;
25 }
26 return true;
27}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition: DM.cpp:213
@ kLastEnum_SkAlphaType
last valid value
Definition: SkAlphaType.h:31
@ kLastEnum_SkColorType
last valid value
Definition: SkColorType.h:56