6 std::vector<int32_t> srcPixels;
11 for (
int y = 0;
y < 16; ++
y) {
12 for (
int x = 0;
x < 16; ++
x) {
13 int32_t* blockStart = &srcPixels.front() +
y *
source.
width() * 16 +
x * 16;
14 size_t transparentCount = 0;
15 for (
int fillY = 0; fillY <
source.
height() / 16; ++fillY) {
16 for (
int fillX = 0; fillX <
source.
width() / 16; ++fillX) {
22 if (transparentCount > 200) {
23 blockStart = &srcPixels.front() +
y *
source.
width() * 16 +
x * 16;
24 for (
int fillY = 0; fillY <
source.
height() / 16; ++fillY) {
25 for (
int fillX = 0; fillX <
source.
width() / 16; ++fillX) {
REG_FIDDLE(Alpha_Constants_a, 256, 128, false, 1)
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)
SK_API sk_sp< SkImage > RasterFromPixmapCopy(const SkPixmap &pixmap)
static SkImageInfo MakeN32Premul(int width, int height)