是否可以使用 Moz2D 图形 API 在桌面应用程序中绘图

Is it possible to use Moz2D graphics API for drawing in a desktop application?

本文关键字:桌面 应用程序 绘图 API 可以使 Moz2D 图形 是否      更新时间:2023-10-16

Moz2D是Firefox的新后端,它目前正在从Cairo切换到它。Moz2D相对于Cairo的优势之一是它使Firefox中的渲染工作更快。以下是Moz2D的基本信息 https://wiki.mozilla.org/Platform/GFX/Moz2D

那么,是否可以在Firefox之外使用Moz2D来绘制,例如SDK窗口?

如果是,您能否提供一些这样做的基本准则?当前状态下的Moz2D文档非常差。

来自Mozilla IRC的 #gfx:

<wafje> is Moz2D/Azure available as an API outside of Firefox, or is it intended to be just for Firefox?
<milan> wafje: it is usable outside the Firefox, at least in that it builds "standalone", but I'm not aware of anybody actually using it in production
  <Bas> milan: I guess Servo, technically.
<milan> Bas: right, and the standalone Skia tests; are they actually running those?
  <Bas> milan: Skia is, or should be.. or do you mean the stand-alone Moz2D tests?
<milan> Bas: probably both :)
  <Bas> milan: To the best of my knowledge neither