7 std::vector<int32_t> srcPixels;
12 for (
int y = 0;
y < 16; ++
y) {
13 for (
int x = 0;
x < 16; ++
x) {
14 int32_t* blockStart = &srcPixels.front() +
y *
source.
width() * 16 +
x * 16;
15 size_t transparentCount = 0;
16 for (
int fillY = 0; fillY <
source.
height() / 16; ++fillY) {
17 for (
int fillX = 0; fillX <
source.
width() / 16; ++fillX) {
23 if (transparentCount > 200) {
24 blockStart = &srcPixels.front() +
y *
source.
width() * 16 +
x * 16;
25 for (
int fillY = 0; fillY <
source.
height() / 16; ++fillY) {
26 for (
int fillX = 0; fillX <
source.
width() / 16; ++fillX) {
constexpr SkColor SK_ColorRED
#define SkColorGetA(color)
constexpr SkAlpha SK_AlphaTRANSPARENT
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
bool readPixels(const SkImageInfo &dstInfo, void *dstPixels, size_t dstRowBytes, int srcX, int srcY) const
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
static SkColor PMColorToColor(SkPMColor c)
#define REG_FIDDLE(NAME, W, H, TEXT, I)
SK_API sk_sp< SkImage > RasterFromPixmapCopy(const SkPixmap &pixmap)
static SkImageInfo MakeN32Premul(int width, int height)