MakeFromStream is not available in Canvaskit

99 views
Skip to first unread message

Steven Whelan

unread,
May 9, 2024, 1:45:00 AM5/9/24
to blink-dev
Hi, 
In C++,I am trying to read a .skp file as SKPicture as below

const char* skpFilePath = "layer_0.skp";
SkFILEStream stream(skpFilePath);
sk_sp<SkPicture> skPicture =SkPicture::MakeFromStream(&stream);
canvas->drawPicture(skPicture.get());

This C++ code works fine. I want to do this in browser. I believe skia cannot run in browser without CanvasKit js binding.

But I cannot find any of these methods in Canvaskit.
I don't think there is any way to run a native C++ command in browser other than using JS bindings.


Ken Russell

unread,
May 9, 2024, 2:26:34 PM5/9/24
to Steven Whelan, blink-dev
Hi Steven,

I think you'll have better success asking about CanvasKit on https://groups.google.com/g/skia-discuss which is suggested on https://skia.org/about/ .

-Ken



--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAO%2BCLgBrr%3Dx2Jot60NipZNLu-aVY5zmroXx%2Bs%3DaY%3D8W5bRiuew%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages