Surface from metalView

58 views
Skip to first unread message

L2000

unread,
Jan 19, 2023, 2:27:36 PM1/19/23
to skia-discuss
Hi ,
      Is it possible to create surface for a MetalView of size width: 400000, height: 20000000. I tried using SkSurface::MakeFromMTKView , but it always returns null value for surface . Whereas for the metalview of size width: 4000, height: 2000 , surface is not null . Can anyone please tell me the reason behind this?

Thanks in Advance.

Jim Van Verth

unread,
Jan 19, 2023, 2:32:04 PM1/19/23
to skia-d...@googlegroups.com
I'm guessing the issue you're running into is that that size exceeds the maximum texture dimensions on your device, so the Metal backend can't set up a texture to render to.

--
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/e0828859-4a86-4da5-95d0-053ecde41dcfn%40googlegroups.com.


--

Jim Van Verth | Software Engineer | jvan...@google.com | 919-210-7664

Asger Jørgensen (Asger-P)

unread,
Jan 20, 2023, 7:51:24 AM1/20/23
to skia-discuss
That will be 32,000 GB of memory if you want 32 bit color, so that will not work for many years to come.
Reply all
Reply to author
Forward
0 new messages