12template <
bool kFast,
bool kScale>
16 fName.
set(
"four_byte_interp");
17 fName.
append(kFast ?
"_fast" :
"_slow");
30 for (
int i = 0;
i < kInputs;
i++) {
36 for (
int i = 0;
i <= 256;
i++) {
39 if (
kScale) fScales[256] = 255;
44 [[maybe_unused]]
volatile SkPMColor junk = 0;
46 for (
int loop = 0; loop < loops; loop++) {
47 for (
int i = 0;
i < kInputs;
i++) {
48 for (
size_t j = 0; j <= 256; j++) {
58 const unsigned scale = fScales[j];
76 static const int kInputs = 10;
77 volatile unsigned fSrcs[kInputs];
78 volatile unsigned fDsts[kInputs];
79 unsigned fScales[257];
static SkPMColor SkFastFourByteInterp256(SkPMColor src, SkPMColor dst, unsigned scale)
static SkPMColor SkFastFourByteInterp(SkPMColor src, SkPMColor dst, U8CPU srcWeight)
static SkPMColor SkFourByteInterp(SkPMColor src, SkPMColor dst, U8CPU srcWeight)
static SkPMColor SkFourByteInterp256(SkPMColor src, SkPMColor dst, int scale)
SK_API SkPMColor SkPreMultiplyColor(SkColor c)
bool isSuitableFor(Backend backend) override
void onDelayedSetup() override
const char * onGetName() override
void onDraw(int loops, SkCanvas *) override
void set(const SkString &src)
void append(const char text[])
const char * c_str() const