58#include <initializer_list>
76 auto context = ctxInfo.directContext();
86 size_t srcSize =
src.computeByteSize();
88 size_t initialCacheSize;
89 context->getResourceCacheUsage(
nullptr, &initialCacheSize);
91 size_t oldMaxBytes = context->getResourceCacheLimit();
95 size_t maxCacheSize = initialCacheSize + 10*srcSize;
96 context->setResourceCacheLimit(maxCacheSize);
101 for (
int i = 0;
i < 100; ++
i) {
106 src.notifyPixelsChanged();
109 context->getResourceCacheUsage(
nullptr, &curCacheSize);
115 context->setResourceCacheLimit(oldMaxBytes);
163 auto context = ctxInfo.directContext();
164 const GrCaps* caps = context->priv().caps();
206 int smallSampleCount =
207 context->priv().caps()->getRenderTargetSampleCount(2,
format);
208 if (smallSampleCount > 1) {
227 int bigSampleCount = context->priv().caps()->getRenderTargetSampleCount(5,
format);
228 if (bigSampleCount > 0 && bigSampleCount != smallSampleCount) {
242 auto context = ctxInfo.directContext();
244 GrGpu* gpu = context->priv().getGpu();
246 if (!gpu || !gpu->glContextForTesting()) {
250 static const int kW = 100;
251 static const int kH = 100;
253 auto mbet = sk_gpu_test::ManagedBackendTexture::MakeWithoutData(
257 if (!mbet || !unmbet.
isValid()) {
262 context->resetContext();
271 if (!borrowed || !adopted) {
280 bool borrowedIsAlive = gpu->isTestingOnlyBackendTexture(mbet->texture());
281 bool adoptedIsAlive = gpu->isTestingOnlyBackendTexture(unmbet);
286 if (adoptedIsAlive) {
287 context->deleteBackendTexture(unmbet);
290 context->resetContext();
294 enum ScratchConstructor { kScratchConstructor };
303 std::string_view label,
310 , fIsScratch(
false) {
319 return new TestResource(gpu, budgeted, property, kScratchConstructor, {},
size);
340 for (
int i = 0;
i < kScratchKeyFieldCnt; ++
i) {
341 builder[
i] =
static_cast<uint32_t
>(
i + property);
346 return sizeof(uint32_t) * (kScratchKeyFieldCnt + skgpu::ScratchKey::kMetaDataCnt);
349 static const int kScratchKeyFieldCnt = 6;
355 std::string_view label,
357 : INHERITED(gpu, label)
360 , fProperty(property)
368 : INHERITED(gpu, label)
372 , fIsScratch(
false) {
383 size_t onGpuMemorySize()
const override {
return fSize; }
384 void onSetLabel()
override{}
385 const char* getResourceType()
const override {
return "Test"; }
389 static int fNumAlive;
394int TestResource::fNumAlive = 0;
433 d->gpuMemorySize() ==
cache->getResourceBytes());
445 cache->getResourceBytes());
451 cache->getResourceBytes());
482 make_unique_key<0>(&uniqueKey, 0);
486 b->resourcePriv().setUniqueKey(uniqueKey);
492 make_unique_key<0>(&uniqueKey2, 1);
496 d->resourcePriv().setUniqueKey(uniqueKey2);
502 d->gpuMemorySize() ==
cache->getResourceBytes());
517 d->gpuMemorySize() ==
cache->getResourceBytes());
525 cache->getResourceBytes());
556 a->refCommandBuffer();
557 b->refCommandBuffer();
576 a->unrefCommandBuffer();
577 b->unrefCommandBuffer();
609 make_unique_key<0>(&uniqueKey, 0);
622 make_unique_key<0>(&uniqueKey2, 1);
624 make_unique_key<0>(&uniqueKey3, 2);
629 GrGpuResource* wrappedUncacheableViaKey =
cache->findAndRefUniqueResource(uniqueKey3);
642 cache->getResourceBytes());
645 cache->getBudgetedResourceBytes());
655 cache->getResourceBytes());
658 cache->getBudgetedResourceBytes());
663 wrappedCacheable->
unref();
664 wrappedUncacheable->
unref();
669 cache->getResourceBytes());
681 wrappedCacheableViaKey =
cache->findAndRefUniqueResource(uniqueKey2);
683 if (wrappedCacheableViaKey) {
685 wrappedCacheable->
unref();
695 cache->getResourceBytes());
706 cache->getResourceBytes());
712 wrappedUncacheable->
unref();
713 wrappedCacheable->
unref();
734 make_unique_key<0>(&uniqueKey, 0);
761 size_t large = 2 *
cache->getResourceBytes();
811 for (
int i = 0;
i < 2; ++
i) {
816 resource->resourcePriv().budgetedType());
841 resource->resourcePriv().makeUnbudgeted();
844 resource->resourcePriv().removeScratchKey();
890 cache->getResourceBytes());
938 find->resourcePriv().removeScratchKey();
951 find =
cache->findAndRefScratchResource(scratchKey);
952 find->resourcePriv().removeScratchKey();
958 find->resourcePriv().removeScratchKey();
991 scratchKey = scratchKey1;
997 scratchKey = scratchKey2;
1015 scratchKey2 = scratchKey;
1016 find =
cache->findAndRefScratchResource(scratchKey2);
1034 make_unique_key<0>(&
key, 0);
1040 a->resourcePriv().setUniqueKey(
key);
1045 a->resourcePriv().setUniqueKey(
key);
1054 b->resourcePriv().setUniqueKey(
key);
1074 make_unique_key<0>(&differentKey, 1);
1107 make_unique_key<0>(&key2, 0);
1111 d->resourcePriv().setUniqueKey(key2);
1115 make_unique_key<0>(&key3, 0);
1127 make_unique_key<0>(&key1, 1);
1128 make_unique_key<0>(&key2, 2);
1129 make_unique_key<0>(&key3, 3);
1136 a->resourcePriv().setUniqueKey(key1);
1137 b->resourcePriv().setUniqueKey(key2);
1138 c->resourcePriv().setUniqueKey(key3);
1152 Bus::Post(Msg(key1, dContext->priv().contextID()));
1153 Bus::Post(Msg(key2, dContext->priv().contextID()));
1154 cache->purgeAsNeeded();
1162 Bus::Post(Msg(key3, dContext->priv().contextID()));
1163 cache->purgeAsNeeded();
1181 scratch =
cache->findAndRefScratchResource(scratchKey);
1195 make_unique_key<0>(&key1, 1);
1196 make_unique_key<0>(&key2, 2);
1200 a->resourcePriv().setUniqueKey(key1);
1201 b->resourcePriv().setUniqueKey(key2);
1204 a->setUnrefWhenDestroyed(
b);
1205 b->setUnrefWhenDestroyed(
a);
1227 static const int kCount = 50;
1228 static const int kLockedFreq = 8;
1229 static const int kBudgetSize = 0;
1234 for (
int i = 0;
i < 2 * kCount; ++
i ) {
1235 Mock mock(kBudgetSize);
1242 static const int kNumToPurge = kCount;
1245 int purgeableCnt = 0;
1250 for (
int j = 0; j < kCount; ++j) {
1252 make_unique_key<0>(&
key, j);
1256 if (random.
nextU() % kLockedFreq) {
1260 if (purgeableCnt <= kNumToPurge) {
1261 *shouldPurgeIdxs.
append() = j;
1264 *resourcesToUnref.
append() = r;
1269 int currShouldPurgeIdx = 0;
1270 for (
int j = 0; j < kCount; ++j) {
1272 make_unique_key<0>(&
key, j);
1274 if (currShouldPurgeIdx < shouldPurgeIdxs.
size() &&
1275 shouldPurgeIdxs[currShouldPurgeIdx] == j) {
1276 ++currShouldPurgeIdx;
1284 for (
int j = 0; j < resourcesToUnref.
size(); ++j) {
1285 resourcesToUnref[j]->unref();
1296 static constexpr int kCnts[] = {1, 10, 1024};
1297 auto nowish = []() {
1301 auto result = skgpu::StdSteadyClock::now();
1307 for (
int cnt : kCnts) {
1308 std::unique_ptr<skgpu::StdSteadyClock::time_point[]> timeStamps(
1309 new skgpu::StdSteadyClock::time_point[cnt]);
1312 for (
int i = 0;
i < cnt; ++
i) {
1315 make_unique_key<1>(&k,
i);
1318 timeStamps.get()[
i] = nowish();
1323 for (
int i = 0;
i < cnt; ++
i) {
1324 cache->purgeResourcesNotUsedSince(timeStamps[
i],
1327 for (
int j = 0; j <
i; ++j) {
1329 make_unique_key<1>(&k, j);
1343 std::unique_ptr<GrGpuResource* []> refedResources(
new GrGpuResource*[cnt / 2]);
1344 for (
int i = 0;
i < cnt; ++
i) {
1347 make_unique_key<1>(&k,
i);
1351 refedResources.get()[
i / 2] = r;
1355 timeStamps.get()[
i] = nowish();
1358 for (
int i = 0;
i < cnt; ++
i) {
1360 cache->purgeResourcesNotUsedSince(timeStamps[
i],
1366 for (
int i = 0;
i < (cnt / 2); ++
i) {
1367 refedResources.get()[
i]->unref();
1380 for (
int i = 0;
i < cnt; ++
i) {
1381 const bool isScratch = (
i % 2 == 0);
1389 make_unique_key<1>(&k,
i);
1393 timeStamps.get()[
i] = nowish();
1396 for (
int i = 0;
i < cnt; ++
i) {
1399 cache->purgeResourcesNotUsedSince(timeStamps[
i],
1411 dContext->flushAndSubmit();
1412 for (
int i = 0;
i < 10; ++
i) {
1415 make_unique_key<1>(&k,
i);
1420 dContext->flushAndSubmit();
1434 kOnlyScratch_TestCase = 0,
1435 kPartialScratch_TestCase = 1,
1436 kAllScratch_TestCase = 2,
1437 kPartial_TestCase = 3,
1440 kEndTests_TestCase = kNone_TestCase + 1
1443 for (
int testCase = 0; testCase < kEndTests_TestCase; testCase++) {
1446 make_unique_key<0>(&key1, 1);
1447 make_unique_key<0>(&key2, 2);
1448 make_unique_key<0>(&key3, 3);
1456 unique2->resourcePriv().setUniqueKey(key2);
1457 unique3->resourcePriv().setUniqueKey(key3);
1481 case kOnlyScratch_TestCase: {
1482 dContext->purgeUnlockedResources(14,
true);
1487 case kPartialScratch_TestCase: {
1488 dContext->purgeUnlockedResources(3,
true);
1493 case kAllScratch_TestCase: {
1494 dContext->purgeUnlockedResources(50,
true);
1499 case kPartial_TestCase: {
1500 dContext->purgeUnlockedResources(13,
false);
1505 case kAll_TestCase: {
1506 dContext->purgeUnlockedResources(50,
false);
1511 case kNone_TestCase: {
1512 dContext->purgeUnlockedResources(0,
true);
1513 dContext->purgeUnlockedResources(0,
false);
1522 dContext->priv().getResourceCache()->purgeUnlockedResources(
1532 make_unique_key<0>(&key1, 1);
1533 make_unique_key<0>(&key2, 2);
1550 dContext->abandonContext();
1562 resource->resourcePriv().getScratchKey();
1563 resource->resourcePriv().budgetedType();
1564 resource->resourcePriv().makeBudgeted();
1565 resource->resourcePriv().makeUnbudgeted();
1566 resource->resourcePriv().removeScratchKey();
1568 make_unique_key<0>(&
key, 1);
1570 resource->resourcePriv().removeUniqueKey();
1576 static constexpr int kLastTagIdx = 10;
1577 static constexpr int kNumResources = kLastTagIdx * (kLastTagIdx + 1) / 2;
1581 GrGpu* gpu = mock.gpu();
1584 std::vector<SkString> tagStrings;
1590 for (
int i = 0;
i < kNumResources; ++
i, ++currTagCnt) {
1594 if (currTagCnt == tagIdx) {
1597 tagStr.
printf(
"tag%d", tagIdx);
1598 tagStrings.emplace_back(tagStr);
1600 make_unique_key<1>(&
key,
i, tagStrings.back().c_str());
1604 SkASSERT(currTagCnt == kLastTagIdx);
1607 for (
int i = 0;
i <= kLastTagIdx; ++
i) {
1622 int freed[3] = { 0, 0, 0 };
1625 int* index = (
int*) ctx;
1629 for (
int i = 0;
i < 3; ++
i) {
1630 backends[
i] = dContext->createBackendTexture(16,
1645 cache->purgeAsNeeded();
1651 cache->purgeAsNeeded();
1657 cache->purgeAsNeeded();
1698 using namespace skgpu;
1700 auto dContext = ctxInfo.directContext();
1701 GrGpu* gpu = dContext->priv().getGpu();
1703 Protected isProtected =
Protected(dContext->priv().caps()->supportsProtectedContent());
1714 int* index = (
int*) ctx;
1726 dContext->deleteBackendTexture(
backend);
1727 dContext->abandonContext();
1785 auto context = ctxInfo.directContext();
1787 const GrCaps* caps = context->priv().caps();
1790 static constexpr auto kArea =
kSize.area();
1801 if (sampleCount >= 4) {
1806 kArea*4*sampleCount ==
size ||
1807 kArea*4*(sampleCount+1) ==
size);
1824 if (sampleCount >= 4) {
1828 kArea*4 + (kArea*4)/3 ==
size ||
1829 kArea*4*sampleCount + (kArea*4)/3 ==
size ||
1830 kArea*4*(sampleCount+1) + (kArea*4)/3 ==
size);
1843 constexpr size_t kTexSize = 16 * 16 * 4;
1845 auto dContext = ctxInfo.directContext();
1846 dContext->setResourceCacheLimit(2 * kTexSize);
1847 auto resourceProvider = dContext->priv().resourceProvider();
1848 auto resourceCache = dContext->priv().getResourceCache();
1849 for (
bool success : {
true,
false }) {
1852 resourceCache->releaseAll();
1862 purgeableTex =
nullptr;
1865 size_t expectedPurgeable = success ? kTexSize : 0;
1867 "%zu vs %zu", expectedPurgeable, resourceCache->getPurgeableBytes());
1869 size_t expectedBudgeted = success ? kTexSize : (2 * kTexSize);
1871 "%zu vs %zu", expectedBudgeted, resourceCache->getBudgetedResourceBytes());
1878 auto context = ctxInfo.directContext();
1879 context->setResourceCacheLimit(1);
1882 auto overbudget = [context] {
1885 context->getResourceCacheUsage(&uNum, &uSize);
1886 size_t bSize = context->getResourceCacheLimit();
1887 return uSize > bSize;
1896 int baseFlushCount = 0;
1897 auto getFlushCountDelta = [context, &baseFlushCount]() {
1898 int cur = context->priv().getGpu()->stats()->numSubmitToGpus();
1899 int delta = cur - baseFlushCount;
1900 baseFlushCount = cur;
1908 drawToSurf(surf1.get());
1909 drawToSurf(surf2.get());
1915 getFlushCountDelta();
1918 drawToSurf(surf1.get());
1920 drawToSurf(surf2.get());
1927 drawToSurf(surf2.get());
static void readback(const SkBitmap &src, int *result, int resultCount)
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
@ kBorrow_GrWrapOwnership
skgpu::Protected Protected
static void test_purge_unlocked(skiatest::Reporter *reporter)
static GrAttachment * get_SB(GrRenderTarget *rt)
static void test_free_texture_messages(skiatest::Reporter *reporter)
static void make_unique_key(skgpu::UniqueKey *key, int data, const char *tag=nullptr)
static void test_tags(skiatest::Reporter *reporter)
static void test_custom_data(skiatest::Reporter *reporter)
static void test_purge_command_buffer_usage(skiatest::Reporter *reporter)
static void test_time_purge(skiatest::Reporter *reporter)
static sk_sp< GrTexture > make_normal_texture(GrResourceProvider *provider, GrRenderable renderable, SkISize dims, int sampleCnt)
static bool is_rendering_and_not_angle_es3(skgpu::ContextType type)
static void test_abandoned(skiatest::Reporter *reporter)
static void test_timestamp_wrap(skiatest::Reporter *reporter)
void test_unbudgeted_to_scratch(skiatest::Reporter *reporter)
static void test_unbudgeted(skiatest::Reporter *reporter)
static void test_remove_scratch_key(skiatest::Reporter *reporter)
static sk_sp< GrRenderTarget > create_RT_with_SB(GrResourceProvider *provider, int size, int sampleCount, skgpu::Budgeted budgeted)
static void test_cache_chained_purge(skiatest::Reporter *reporter)
static void test_partial_purge(skiatest::Reporter *reporter)
static sk_sp< GrTextureProxy > make_mipmap_proxy(GrRecordingContext *rContext, GrRenderable renderable, SkISize dims, int sampleCnt)
DEF_GANESH_TEST(ResourceCacheMisc, reporter,, CtsEnforcement::kApiLevel_T)
static void test_no_key(skiatest::Reporter *reporter)
static void test_scratch_key_consistency(skiatest::Reporter *reporter)
static void test_budgeting(skiatest::Reporter *reporter)
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(ResourceCacheCache, reporter, ctxInfo, CtsEnforcement::kApiLevel_T)
static void test_purge_invalidated(skiatest::Reporter *reporter)
static void test_duplicate_unique_key(skiatest::Reporter *reporter)
DEF_GANESH_TEST_FOR_CONTEXTS(ResourceCacheStencilBuffers, &is_rendering_and_not_angle_es3, reporter, ctxInfo, nullptr, CtsEnforcement::kApiLevel_T)
static void test_duplicate_scratch_key(skiatest::Reporter *reporter)
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
constexpr SkColor SK_ColorBLACK
static void releaseProc(const void *ptr, void *context)
static SkString resource(SkPDFResourceType type, int index)
static void SkSafeUnref(T *obj)
sk_sp< T > sk_ref_sp(T *obj)
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
static constexpr bool SkToBool(const T &x)
#define DEF_GANESH_TEST_FOR_MOCK_CONTEXT(name, reporter, context_info)
#define REPORTER_ASSERT(r, cond,...)
static sk_sp< GrTextureProxy > wrapped(skiatest::Reporter *reporter, GrRecordingContext *rContext, GrProxyProvider *proxyProvider, SkBackingFit fit)
int find(T *array, int N, T item)
const GrCaps * caps() const
bool mipmapSupport() const
bool avoidStencilBuffers() const
GrBackendFormat getDefaultBackendFormat(GrColorType, GrRenderable) const
virtual int getRenderTargetSampleCount(int requestedCount, const GrBackendFormat &) const =0
GrResourceCache * getResourceCache()
static sk_sp< GrDirectContext > MakeMock(const GrMockOptions *, const GrContextOptions &)
GrDirectContextPriv priv()
void setResourceCacheLimit(size_t maxResourceBytes)
void setUniqueKey(const skgpu::UniqueKey &key)
size_t gpuMemorySize() const
const skgpu::UniqueKey & getUniqueKey() const
GrGpuResource(GrGpu *, std::string_view label)
void registerWithCacheWrapped(GrWrapCacheable)
void registerWithCache(skgpu::Budgeted)
ResourcePriv resourcePriv()
sk_sp< GrTexture > wrapBackendTexture(const GrBackendTexture &, GrWrapOwnership, GrWrapCacheable, GrIOType)
sk_sp< GrTextureProxy > createProxy(const GrBackendFormat &, SkISize dimensions, GrRenderable, int renderTargetSampleCnt, skgpu::Mipmapped, SkBackingFit, skgpu::Budgeted, GrProtected, std::string_view label, GrInternalSurfaceFlags=GrInternalSurfaceFlags::kNone, UseAllocator useAllocator=UseAllocator::kYes)
GrProxyProvider * proxyProvider()
GrRecordingContextPriv priv()
GrAttachment * getStencilAttachment(bool useMSAASurface) const
size_t getResourceBytes() const
static std::enable_if_t< std::is_base_of_v< GrGpuResource, T >, void > ReturnResourceFromThread(sk_sp< T > &&resource, GrDirectContext::DirectContextID id)
int getResourceCount() const
void purgeUnlockedResources(GrPurgeResourceOptions opts)
bool attachStencilAttachment(GrRenderTarget *rt, bool useMSAASurface)
sk_sp< GrTexture > wrapBackendTexture(const GrBackendTexture &tex, GrWrapOwnership, GrWrapCacheable, GrIOType)
GrResourceProviderPriv priv()
sk_sp< GrTexture > createTexture(SkISize dimensions, const GrBackendFormat &format, GrTextureType textureType, skgpu::Renderable renderable, int renderTargetSampleCnt, skgpu::Mipmapped mipmapped, skgpu::Budgeted budgeted, skgpu::Protected isProtected, std::string_view label)
const GrCaps * caps() const
const GrBackendFormat & backendFormat() const
size_t gpuMemorySize() const
virtual GrBackendFormat backendFormat() const =0
void setRelease(sk_sp< skgpu::RefCntedCallback > releaseHelper)
virtual GrRenderTarget * asRenderTarget()
GrDirectContext * dContext()
GrResourceCache * cache()
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
const void * data() const
static sk_sp< SkData > MakeWithCopy(const void *data, size_t length)
uint32_t nextULessThan(uint32_t count)
void printf(const char format[],...) SK_PRINTF_LIKE(2
const char * c_str() const
static const size_t kDefaultSize
static size_t ExpectedScratchKeySize()
static TestResource * CreateScratch(GrGpu *gpu, skgpu::Budgeted budgeted, SimulatedProperty property, size_t size=kDefaultSize)
static TestResource * CreateWrapped(GrGpu *gpu, GrWrapCacheable cacheable, size_t size=kDefaultSize)
TestResource(GrGpu *gpu, std::string_view label, skgpu::Budgeted budgeted=skgpu::Budgeted::kYes, size_t size=kDefaultSize)
static void ComputeScratchKey(SimulatedProperty property, skgpu::ScratchKey *key)
void setUnrefWhenDestroyed(sk_sp< TestResource > resource)
void reset(T *ptr=nullptr)
static ResourceType GenerateResourceType()
static Domain GenerateDomain()
SkData * getCustomData() const
void setCustomData(sk_sp< SkData > data)
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
uint32_t uint32_t * format
SK_API sk_sp< SkSurface > RenderTarget(GrRecordingContext *context, skgpu::Budgeted budgeted, const SkImageInfo &imageInfo, int sampleCount, GrSurfaceOrigin surfaceOrigin, const SkSurfaceProps *surfaceProps, bool shouldCreateWithMips=false, bool isProtected=false)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace Enable an endless trace buffer The default is a ring buffer This is useful when very old events need to viewed For during application launch Memory usage will continue to grow indefinitely however Start app with an specific route defined on the framework flutter assets Path to the Flutter assets directory enable service port Allow the VM service to fallback to automatic port selection if binding to a specified port fails trace Trace early application lifecycle Automatically switches to an endless trace buffer trace skia Filters out all Skia trace event categories except those that are specified in this comma separated list dump skp on shader Automatically dump the skp that triggers new shader compilations This is useful for writing custom ShaderWarmUp to reduce jank By this is not enabled to reduce the overhead purge persistent cache
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
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 The size limit in megabytes for the Dart VM old gen heap space enable Enable the Impeller renderer on supported platforms Ignored if Impeller is not supported on the platform enable vulkan Enable loading Vulkan validation layers The layers must be available to the application and loadable On non Vulkan backends
@ kANGLE_GL_ES3
ANGLE on OpenGL OpenGL ES 2 context.
@ kANGLE_D3D11_ES3
ANGLE on Direct3D11 OpenGL ES 2 context.
@ kANGLE_Metal_ES3
ANGLE on Metal ES 2 context.
bool IsRenderingContext(skgpu::ContextType type)
static constexpr SkIRect MakeWH(int32_t w, int32_t h)
static SkImageInfo MakeN32Premul(int width, int height)
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)
static constexpr SkRect MakeWH(float w, float h)
std::shared_ptr< const fml::Mapping > data