Split weston_view_create() into public and internal
This is heading towards being able to materialise subsurface views closer to the source. weston_view_create() - being used only by window-management code - will ultimately create all required subsurface views as well. The internal variant will be used by this and also by the subsurface code as required. Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
0f99e081c4
commit
94a9cc1b24
|
@ -459,8 +459,8 @@ region_init_infinite(pixman_region32_t *region)
|
|||
static struct weston_subsurface *
|
||||
weston_surface_to_subsurface(struct weston_surface *surface);
|
||||
|
||||
WL_EXPORT struct weston_view *
|
||||
weston_view_create(struct weston_surface *surface)
|
||||
static struct weston_view *
|
||||
weston_view_create_internal(struct weston_surface *surface)
|
||||
{
|
||||
struct weston_view *view;
|
||||
|
||||
|
@ -499,6 +499,12 @@ weston_view_create(struct weston_surface *surface)
|
|||
return view;
|
||||
}
|
||||
|
||||
WL_EXPORT struct weston_view *
|
||||
weston_view_create(struct weston_surface *surface)
|
||||
{
|
||||
return weston_view_create_internal(surface);
|
||||
}
|
||||
|
||||
struct weston_presentation_feedback {
|
||||
struct wl_resource *resource;
|
||||
|
||||
|
@ -2972,7 +2978,7 @@ view_list_add_subsurface_view(struct weston_compositor *compositor,
|
|||
wl_list_remove(&view->surface_link);
|
||||
wl_list_insert(&sub->surface->views, &view->surface_link);
|
||||
} else {
|
||||
view = weston_view_create(sub->surface);
|
||||
view = weston_view_create_internal(sub->surface);
|
||||
weston_view_set_transform_parent(view, parent);
|
||||
weston_view_set_rel_position(view, sub->position.offset);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue