Westeros 小註解

關於這個題目, 可以依據過去的歷史, 看出發展的軌跡.

    1. STB/OTT box 需要一個 browser.
    2. 過去常用的 qtwebkit 已經不 maintain 了. 下一代是 Blink 或是 Webkitgtk+.
    3. 將 Wbkitgtk+ 中的gtk+ 拔掉, X server 換成 Wayland, 就得到 Wayland for Webkit. 架構圖如下 [from igalia]:webkitgtkJPG
    4. X server 哪裏不好?因為它不是 client-server 的架構, 所以彈性較差.
    5. Wayland 就是 client-server 的 protocol. 下圖取材自 WIKI [1].
    6. Weston 是一種 Wayland Compositor 的架構 (reference design). 其他架構包括: Lipstick、EnlightenmentKWinMutterClayland...等等. [1]
    7. Westeros 是擴充的 Weston 版本.

    Wayland_display_server_protocol.svg_

    Westeros 有什麼不一樣呢?在 github  [2] 上說了:

    Wayland Compositor

    Westeros is a light-weight Wayland compositor library. It uses the Wayland protocols, and is designed to be compatible with applications built to use Wayland compositors. It implements a library that enables an application to create one or more Wayland displays. It supports the creation of normal, nested, and embedded wayland compositors. A normal compositor displays its composited output to the screen, while a nested compositor sends its composited output to another compositor as a client surface. An embedded compositor allows the application that has created the embedded Wayland compositor to incorporate its composited output into the applications UI. This allows for easy integration of the UI of external third party applications into an applications’s UI.

    關鍵字是可以產生多個 display. 正常的 display 就是一路 UI. nested 版本可以把一個 compositor 做出的 display 加到另外一個 compositor. embedded 版本做出的 display 可以加到 APP 的 UI, 也就是 APP 的 UI 不用完全透過 Wayland 來畫圖. 這樣看來, Westerns 比普通版的 Weston 要有彈性多了.

    [REF]

    1. https://en.wikipedia.org/wiki/Wayland_(display_server_protocol)#Weston
    2. https://github.com/rdkcmf/westeros