structweston_view{// 省略/*
* The primary output for this view.
* Used for picking the output for driving internal animations on the
* view, inheriting the primary output for related views in shells, etc.
*/structweston_output*output;/*
* A more complete representation of all outputs this surface is
* displayed on.
*/uint32_t output_mask;}
/**
* \param surface The surface to be repainted
*
* Marks the output(s) that the surface is shown on as needing to be
* repainted. See weston_output_schedule_repaint().
*/
WL_EXPORT voidweston_surface_schedule_repaint(structweston_surface*surface){structweston_output*output;wl_list_for_each(output,&surface->compositor->output_list, link)// 比如 output->id 为 0 output_mask为 0001// 下面的 判断,就会通过。进而触发选定的output进行repaintif(surface->output_mask &(1u<< output->id))weston_output_schedule_repaint(output);}
Weston多屏显示Weston默认支持多屏显示(比如前屏+后屏)output对象可以理解为逻辑上的一块屏幕,对于DRM,其信息通过drmModeGetResources接口获得。View结构体有两个成员,一个保存output对象的引用来作为primary output,一个用来记录当前View显示的output信息。struct weston_view { /* * The primary output for this view. * Used for picking the