Add a composition info, composedByHwc, in META packet to
notify users whether this frame is composed by Hardware composer.
--HG--
extra : rebase_source : b3883178f41acb92fa91b0cab5905d22fcf38553
We have to create the websocket if it doesn't exist after enabling
Layerscope. Therefore, we don't have to reboot the device anymore.
1. Remove the Init and DeInit in CreateCompositor and DestroyCompositor
to prevent some unwanted deInits on the browser. (Our browser often
calls DestroyCompositor)
2. Initize websocket only when we need it.
We also want to dump layer tree on the viewer, so we
can check the layer tree and layerscope together
in the viewer. This can help us resolve more gfx bugs.
In this patch, I only add a part of the layer data to
the protocol buffer packet, and you can check the
.proto file for more information if you want to add
more layer data.
By the way, as Jeff's suggestion, use auto & MakeUnique<>()
to make the UniquePtr initialization more concise.