39 for (
int i = 0;
i < 500; ++
i) {
56 sk_bzero(&prevLevel,
sizeof(prevLevel));
59 for (
int j = 0; j < 30; ++j) {
93 for (
int i = 0;
i < mipLevelCount; ++
i) {
103 int twoToTheMipLevel = 1 << (
i + 1);
104 int currentWidth =
width / twoToTheMipLevel;
105 int currentHeight =
height / twoToTheMipLevel;
177 for (
auto& currentTest :
tests) {
223 for (
auto& currentTest :
tests) {
225 currentTest.fBaseHeight,
253 auto img1 = img->withDefaultMipmaps();
260 auto img2 =
builder.attachTo(img);
272 auto img2 =
builder.attachTo(img);
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
sk_bzero(glyphs, sizeof(glyphs))
static void make_bitmap(SkBitmap *bm, int width, int height)
static void test_mipmap_generation(int width, int height, int expectedMipLevelCount, skiatest::Reporter *reporter)
static void fill_in_mips(SkMipmapBuilder *builder, sk_sp< SkImage > img)
DEF_TEST(MipMap, reporter)
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kRGBA_F16_SkColorType
pixel with half floats for red, green, blue, alpha;
@ kRGB_565_SkColorType
pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word
constexpr SkColor SK_ColorWHITE
#define REPORTER_ASSERT(r, cond,...)
void allocPixels(const SkImageInfo &info, size_t rowBytes)
void allocN32Pixels(int width, int height, bool isOpaque=false)
void eraseColor(SkColor4f) const
sk_sp< SkImage > makeRasterImage(GrDirectContext *, CachingHint cachingHint=kDisallow_CachingHint) const
const SkImageInfo & imageInfo() const
static SkMipmap * Build(const SkPixmap &src, SkDiscardableFactoryProc, bool computeContents=true)
static SkISize ComputeLevelSize(int baseWidth, int baseHeight, int level)
bool extractLevel(SkSize scale, Level *) const
bool getLevel(int index, Level *) const
static int ComputeLevelCount(int baseWidth, int baseHeight)
const void * addr() const
SK_API sk_sp< SkSurface > WrapPixels(const SkImageInfo &imageInfo, void *pixels, size_t rowBytes, const SkSurfaceProps *surfaceProps=nullptr)
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
SkISize fExpectedMipMapLevelSize
static constexpr SkISize Make(int32_t w, int32_t h)
SkImageInfo makeWH(int newWidth, int newHeight) const
SkImageInfo makeAlphaType(SkAlphaType newAlphaType) const
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)
SkAlphaType alphaType() const
SkColorType colorType() const
SkImageInfo makeColorType(SkColorType newColorType) const
static SkRect MakeIWH(int w, int h)
static constexpr SkSize Make(SkScalar w, SkScalar h)