Go to the source code of this file.
|
| REG_FIDDLE (Pixmap_readPixels_3, 256, 256, false, 3) |
|
◆ REG_FIDDLE()
REG_FIDDLE |
( |
Pixmap_readPixels_3 |
, |
|
|
256 |
, |
|
|
256 |
, |
|
|
false |
, |
|
|
3 |
|
|
) |
| |
Definition at line 4 of file Pixmap_readPixels_3.cpp.
4 {
7 std::vector<int32_t> srcPixels;
10 SkPixmap pixmap(
info, (
const void*) &srcPixels.front(), rowBytes);
12 for (
int offset : { 32, 64, 96 } ) {
13 std::vector<int32_t> dstPixels;
16 pixmap.readPixels(dstmap,
offset, 0);
18 bitmap.installPixels(dstmap);
21 }
22}
23}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void translate(SkScalar dx, SkScalar dy)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
bool readPixels(GrDirectContext *context, const SkImageInfo &dstInfo, void *dstPixels, size_t dstRowBytes, int srcX, int srcY, CachingHint cachingHint=kAllow_CachingHint) const
sk_sp< const SkImage > image
static SkImageInfo MakeN32Premul(int width, int height)