32 for(
int i = nFilters;
i --> 0;) {
40 for(
int i = 0;
i < loops;
i++) {
42 paint.setImageFilter(fImageFilter);
64 surf->getCanvas()->drawPaint(
paint);
65 fImage = surf->makeImageSnapshot();
72 return "image_filter_collapse_table";
76 for (
int i = 0;
i < 256; ++
i) {
78 table1[
i] = (n << 5) | (n << 2) | (n >> 1);
80 table2[
i] =
i *
i / 255;
82 float fi =
i / 255.0f;
83 table3[
i] =
static_cast<uint8_t
>(sqrtf(fi) * 255);
96 uint8_t table1[256], table2[256], table3[256];
109 memset(
matrix, 0, 20 *
sizeof(
float));
120 return "image_filter_collapse_matrix";
static sk_sp< SkColorFilter > make_brightness(float amount)
static sk_sp< SkColorFilter > make_grayscale()
constexpr SkColor SK_ColorCYAN
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorGREEN
constexpr SkColor SK_ColorWHITE
void doPreDraw(sk_sp< SkColorFilter > colorFilters[], int nFilters)
BaseImageFilterCollapseBench()
void onDraw(int loops, SkCanvas *canvas) override
const char * onGetName() override
void onDelayedSetup() override
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
static sk_sp< SkColorFilter > Table(const uint8_t table[256])
static sk_sp< SkColorFilter > Matrix(const SkColorMatrix &)
static sk_sp< SkShader > MakeLinear(const SkPoint pts[2], const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
static sk_sp< SkImageFilter > ColorFilter(sk_sp< SkColorFilter > cf, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
const char * onGetName() override
void onDelayedSetup() override
unsigned useCenter Optional< SkMatrix > matrix
PODArray< SkColor > colors
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
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
SkSamplingOptions(SkFilterMode::kLinear))
static SkImageInfo MakeN32Premul(int width, int height)