41 TestSkTraceMemoryDump(
bool shouldDumpWrappedObjects)
42 : fShouldDumpWrappedObjects(shouldDumpWrappedObjects) {}
43 ~TestSkTraceMemoryDump()
override { }
45 void dumpNumericValue(
const char* dumpName,
const char* valueName,
const char* units,
46 uint64_t
value)
override {
50 fDumpedObjectsSize +=
value;
54 const char* backingObjectId)
override { }
63 size_t numDumpedObjects()
const {
return fNumDumpedObjects; }
64 size_t dumpedObjectsSize()
const {
return fDumpedObjectsSize; }
67 bool fShouldDumpWrappedObjects;
68 size_t fNumDumpedObjects = 0;
69 size_t fDumpedObjectsSize = 0;
73 size_t numDumpedObjects,
size_t size,
bool isOwned) {
75 TestSkTraceMemoryDump dump_with_wrapped(
true );
80 TestSkTraceMemoryDump dump_no_wrapped(
false );
95 auto dContext = ctxInfo.directContext();
97 const size_t kMemorySize = 1024;
101 ValidateMemoryDumps(
reporter, dContext, 2, kMemorySize,
true );
108 auto dContext = ctxInfo.directContext();
119 auto texture = sk_make_sp<GrGLTexture>(gpu,
123 "SkTraceMemoryDump_ownedGLTexture");
125 ValidateMemoryDumps(
reporter, dContext, 2,
texture->gpuMemorySize(),
true );
132 auto dContext = ctxInfo.directContext();
143 auto params = sk_make_sp<GrGLTextureParameters>();
153 ValidateMemoryDumps(
reporter, dContext, 2,
texture->gpuMemorySize(),
false );
160 auto dContext = ctxInfo.directContext();
181 ValidateMemoryDumps(
reporter, dContext, 2, rt->gpuMemorySize(),
true );
188 auto dContext = ctxInfo.directContext();
209 ValidateMemoryDumps(
reporter, dContext, 2, rt->gpuMemorySize(),
false );
216 auto dContext = ctxInfo.directContext();
236 auto texRT = sk_make_sp<GrGLTextureRenderTarget>(
243 "SkTraceMemoryDump_ownedGLTextureRenderTarget");
245 ValidateMemoryDumps(
reporter, dContext, 3, texRT->gpuMemorySize(),
true );
@ kDynamic_GrAccessPattern
#define REPORTER_ASSERT(r, cond,...)
#define DEF_GANESH_TEST_FOR_GL_CONTEXT(name, reporter, context_info, ctsEnforcement)
void dumpMemoryStatistics(SkTraceMemoryDump *traceMemoryDump) const
GrDirectContextPriv priv()
static sk_sp< GrGLBuffer > Make(GrGLGpu *, size_t size, GrGpuBufferType intendedType, GrAccessPattern)
static sk_sp< GrGLRenderTarget > MakeWrapped(GrGLGpu *, const SkISize &, GrGLFormat, int sampleCount, const IDs &, int stencilBits, skgpu::Protected, std::string_view label)
static sk_sp< GrGLTexture > MakeWrapped(GrGLGpu *, GrMipmapStatus, const Desc &, sk_sp< GrGLTextureParameters >, GrWrapCacheable, GrIOType, std::string_view label)
virtual void setMemoryBacking(const char *dumpName, const char *backingType, const char *backingObjectId)=0
virtual void setDiscardableMemoryBacking(const char *dumpName, const SkDiscardableMemory &discardableMemoryObject)=0
virtual LevelOfDetail getRequestedDetails() const =0
@ kObjectsBreakdowns_LevelOfDetail
virtual bool shouldDumpWrappedObjects() const
virtual void dumpNumericValue(const char *dumpName, const char *valueName, const char *units, uint64_t value)=0
const EmbeddedViewParams * params
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 buffer
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
int fTotalMemorySamplesPerPixel
GrGLuint fMultisampleFBOID
GrBackendObjectOwnership fRTFBOOwnership
GrGLuint fSingleSampleFBOID
GrGLuint fMSColorRenderbufferID
skgpu::Protected fIsProtected
GrBackendObjectOwnership fOwnership
static constexpr SkISize Make(int32_t w, int32_t h)