Skia codebase questions

29 views
Skip to first unread message

Adam Bennett

unread,
May 23, 2022, 1:36:23 PMMay 23
to skia-discuss
I've been reading the Skia codebase this weekend and have compiled (the code) and a couple of questions:
  • Are the Gr namespaced types for Ganesh or Graphite?
  • Does Ganesh have a separate codebase?
  • What is gpu/graphite and GraphiteMetal? I noticed there's a Grafana site linked to from skia.org but I couldn't definitively infer from the codebase if there was a connection to Graphite metrics.
Thanks!

Greg Daniel

unread,
May 23, 2022, 1:47:13 PMMay 23
to skia-discuss
On Mon, May 23, 2022 at 1:36 PM Adam Bennett <amb.1...@gmail.com> wrote:
I've been reading the Skia codebase this weekend and have compiled (the code) and a couple of questions:
  • Are the Gr namespaced types for Ganesh or Graphite?

The Gr names are connected to Ganesh. Historically we didn't use namespaces in Skia so the Gr prefix was used to distinguish GPU backend code from general Skia code (Sk prefix)
 
  • Does Ganesh have a separate codebase?

The code for Ganesh generally all lives in <skia>/src/gpu/ganesh. 
 
  • What is gpu/graphite and GraphiteMetal? I noticed there's a Grafana site linked to from skia.org but I couldn't definitively infer from the codebase if there was a connection to Graphite metrics.

So Ganesh is Skia's old/current GPU backend. Graphite is the new backend that is currently being developed. So Ganesh code tends to live in gpu/ganesh and Graphite code lives in gpu/graphite. Shared code lives directly in gpu/. The one little caveat to this is that the public GPU files for Ganesh still live in <skia>/include/gpu whereas the Graphite are in <skia/include/gpu/graphite. Moving the public Ganesh files of include to a Ganesh subdirectory would cause a lot of churn on external clients right now so we haven't done that.

GraphiteMetal just refers to the Metal backend of Graphite. Though in general I believe this specific name (i.e. GraphiteMetal) is just used in our test tools and not really in the Skia library.
 
Thanks!

--
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/620b0fc6-836f-48be-9b5a-1e94c78e3c13n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages