Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions | Variables
SkMask.cpp File Reference
#include "src/core/SkMask.h"
#include "include/private/base/SkMalloc.h"
#include "include/private/base/SkMath.h"
#include "include/private/base/SkTFitsIn.h"
#include "include/private/base/SkTo.h"
#include "src/base/SkSafeMath.h"
#include <array>
#include <climits>

Go to the source code of this file.

Functions

static int32_t safeMul32 (int32_t a, int32_t b)
 
static int maskFormatToShift (SkMask::Format format)
 

Variables

static const int gMaskFormatToShift []
 

Function Documentation

◆ maskFormatToShift()

static int maskFormatToShift ( SkMask::Format  format)
static

Definition at line 106 of file SkMask.cpp.

106 {
107 SkASSERT((unsigned)format < std::size(gMaskFormatToShift));
110}
#define SkASSERT(cond)
Definition SkAssert.h:116
static const int gMaskFormatToShift[]
Definition SkMask.cpp:97
uint32_t uint32_t * format
@ kBW_Format
1bit per pixel mask (e.g. monochrome)
Definition SkMask.h:27

◆ safeMul32()

static int32_t safeMul32 ( int32_t  a,
int32_t  b 
)
static

returns the product if it is positive and fits in 31 bits. Otherwise this returns 0.

Definition at line 22 of file SkMask.cpp.

22 {
23 int64_t size = sk_64_mul(a, b);
24 if (size > 0 && SkTFitsIn<int32_t>(size)) {
25 return size;
26 }
27 return 0;
28}
static int64_t sk_64_mul(int64_t a, int64_t b)
Definition SkMath.h:33
static bool b
struct MyStruct a[10]
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 keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition switches.h:259

Variable Documentation

◆ gMaskFormatToShift

const int gMaskFormatToShift[]
static
Initial value:
= {
~0,
0,
0,
2,
1,
0,
}

Definition at line 97 of file SkMask.cpp.

97 {
98 ~0, // BW -- not supported
99 0, // A8
100 0, // 3D
101 2, // ARGB32
102 1, // LCD16
103 0, // SDF
104};