Confirmed users
753
edits
Line 69: | Line 69: | ||
==Random Notes== | ==Random Notes== | ||
===ownership model=== | ===ownership model=== | ||
<pre>Current: | <pre> | ||
Current: | |||
Line 133: | Line 134: | ||
* The result then looks exactly like above diagram, without adding any extra dependency | * The result then looks exactly like above diagram, without adding any extra dependency | ||
to Moz2D. | to Moz2D. | ||
What we ended up doing: | |||
Instead of directly referencing the GLContext, the GrContext only references the | |||
DrawTargetSkia referencing it. In this way, the only raw pointer we have is just | |||
walking back a strong reference. As planned, DrawTargetSkia references the GLContext | |||
by means of a virtual base class, so no dependency is added to Moz2D. | |||
CanvasRenderingContext2D | |||
| | |||
GLContext | | |||
^ | regular Gecko stuff | |||
| | (libxul) | |||
\ | | |||
----------\----------+----------------------------------- | |||
\ | | |||
\ | | |||
\ | Moz2D. | |||
\ | | |||
\ V | |||
DrawTargetSkia | |||
^ | | |||
. | | |||
------------------.--+----------------------------------- | |||
. | | |||
. V | |||
GrContext Skia | |||
</pre> | </pre> |