![]() |
Skia
2D Graphics Library
|
#include "include/core/SkTypes.h"
Go to the source code of this file.
Functions | |
static int64_t | sk_64_mul (int64_t a, int64_t b) |
template<typename T > | |
constexpr bool | SkIsPow2 (T value) |
Returns true if value is a power of 2. More... | |
static unsigned | SkMul16ShiftRound (U16CPU a, U16CPU b, int shift) |
Return a*b/((1 << shift) - 1), rounding any fractional bits. More... | |
static U8CPU | SkMulDiv255Round (U16CPU a, U16CPU b) |
Return a*b/255, rounding any fractional bits. More... | |
|
inlinestatic |
|
inlineconstexpr |
Returns true if value is a power of 2.
Does not explicitly check for value <= 0.
Return a*b/((1 << shift) - 1), rounding any fractional bits.
Only valid if a and b are unsigned and <= 32767 and shift is > 0 and <= 8