In more detail (this is from [https://wiki.mozilla.org/User:VladVukicevic/Gralloc Vlad's wiki page]):
Content side:
* Entry point: PLayersTransactionChild::SendPGrallocBufferConstructor (generally called by ISurfaceAllocator::AllocGrallocBuffer).
* This sends a synchronous IPC message to the compositor side.
Over to the compositor side:
* The GrallocBufferActor/PGrallocBufferParent* is added to the LayerTransactionParent's managed list.
* The MaybeMagicGrallocBufferHandle is serialized for reply (sending back the fd that represents the GraphicBuffer) -- using code in ShadowLayerUtilsGralloc ParamTraits<MGBH>::Write.
Back to the content side: