Recording context incase of Skpicture backend

38 views
Skip to first unread message

syawin

unread,
Jul 6, 2021, 3:09:57 PM7/6/21
to skia-discuss
Hello there,

In order to know the memory usage of GPU cache followed below way , 

 canvas->recordingContext()->asDirectContext()->getResourceCacheUsage(&fOldCount, &UsedGpuCache)

After switched to skpicture, canvas->recordingContext() is received as nullptr.

With Skpicture as backend, how can I surf through GPUCache?
--
Syawin

Brian Salomon

unread,
Jul 6, 2021, 3:24:08 PM7/6/21
to skia-d...@googlegroups.com
I assume you're still playing the pictures back to a GPU-backed surface somewhere. Just call getResourceCacheUsage directly on the GrDirectContext you use to make the playback surface.

--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/c1fd77cc-f570-4abf-a43e-21827f1af8cen%40googlegroups.com.

syawin

unread,
Jul 9, 2021, 3:14:21 AM7/9/21
to skia-discuss
Thanks Brian. Your Input helped to address the issue.
Reply all
Reply to author
Forward
0 new messages