70 { kN32_SkColorType,
"0101111" },
128 if (
bitmap.extractSubset(&subset, r)) {
139 for (
int y = 0;
y < 4; ++
y) {
140 for (
int x = 0;
x < 4; ++
x) {
167 const size_t rowBytes =
W *
sizeof(
SkPMColor);
178 bool fExpectedSuccess;
185 {
true, { 0, 0 }, { 4, 4 }, { 0, 0 }, { 0, 0, 4, 4 } },
186 {
true, { 1, 1 }, { 2, 2 }, { 0, 0 }, { 1, 1, 3, 3 } },
187 {
true, { 2, 2 }, { 4, 4 }, { 0, 0 }, { 2, 2, 4, 4 } },
188 {
true, {-1,-1 }, { 2, 2 }, { 1, 1 }, { 0, 0, 1, 1 } },
189 {
false, {-1,-1 }, { 1, 1 }, { 0, 0 }, { 0, 0, 0, 0 } },
196 bool success = srcBM.
readPixels(dstInfo, dstPixels, rowBytes,
197 gRec[
i].fRequestedSrcLoc.x(),
gRec[
i].fRequestedSrcLoc.y());
202 const int dstX =
gRec[
i].fExpectedDstLoc.x();
203 const int dstY =
gRec[
i].fExpectedDstLoc.y();
205 for (
int y = 0;
y <
H; ++
y) {
206 for (
int x = 0;
x <
W; ++
x) {
209 int sx =
x - dstX + srcR.
x();
210 int sy =
y - dstY + srcR.
y();
static bool check_4x4_pixel(SkPMColor color, unsigned x, unsigned y)
DEF_TEST(BitmapCopy_extractSubset, reporter)
static void fill_4x4_pixels(SkPMColor colors[16])
static void setup_src_bitmaps(SkBitmap *srcOpaque, SkBitmap *srcPremul, SkColorType ct)
static void init_src(const SkBitmap &bitmap)
static void clear_4x4_pixels(SkPMColor colors[16])
static const Pair gPairs[]
static const struct @223 gRec[]
@ kOpaque_SkAlphaType
pixel is opaque
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
#define SkGetPackedB32(packed)
#define SkGetPackedR32(packed)
#define SkGetPackedA32(packed)
#define SkGetPackedG32(packed)
static SkPMColor SkPackARGB32(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
@ kARGB_4444_SkColorType
pixel with 4 bits for alpha, red, green, blue; in 16-bit word
@ kRGBA_F16_SkColorType
pixel with half floats for red, green, blue, alpha;
@ kAlpha_8_SkColorType
pixel with alpha in 8-bit byte
@ kRGB_565_SkColorType
pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word
@ kUnknown_SkColorType
uninitialized
constexpr SkColor SK_ColorWHITE
static void copy(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
#define REPORTER_ASSERT(r, cond,...)
void allocPixels(const SkImageInfo &info, size_t rowBytes)
bool installPixels(const SkImageInfo &info, void *pixels, size_t rowBytes, void(*releaseProc)(void *addr, void *context), void *context)
SkAlphaType alphaType() const
bool readPixels(const SkImageInfo &dstInfo, void *dstPixels, size_t dstRowBytes, int srcX, int srcY) const
uint32_t getGenerationID() const
static sk_sp< SkColorSpace > MakeSRGB()
void(* memset32)(uint32_t[], uint32_t, int)
PODArray< SkColor > colors
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
SkIPoint * operator[](int i) const
constexpr int32_t x() const
constexpr int32_t y() const
void setLTRB(int32_t left, int32_t top, int32_t right, int32_t bottom)
bool contains(int32_t x, int32_t y) const
static SkImageInfo MakeN32Premul(int width, int height)
SkImageInfo makeDimensions(SkISize newSize) const
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)