From: Seunghun Lee Date: Tue, 8 Aug 2023 07:25:15 +0000 (+0900) Subject: subsurface: Add more log for debug X-Git-Tag: accepted/tizen/8.0/unified/20231005.094156^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F51%2F298751%2F1;p=platform%2Fcore%2Fuifw%2Flibds.git subsurface: Add more log for debug Change-Id: Id65f232c674e01b4a0c41e03bc587f248439757b --- diff --git a/src/compositor/subsurface.c b/src/compositor/subsurface.c index c96a1a7..07f35e7 100644 --- a/src/compositor/subsurface.c +++ b/src/compositor/subsurface.c @@ -88,7 +88,7 @@ create_subsurface(struct wl_resource *factory_resource, subsurface_link_surface(subsurface, surface); subsurface_link_parent(subsurface, parent); - ds_inf("New ds_subsurface %p: surface %p, parent surface %p", + ds_inf("New ds_subsurface(%p): surface(%p), parent surface(%p)", subsurface, surface, parent); wl_signal_emit_mutable(&parent->events.new_subsurface, subsurface); @@ -107,8 +107,14 @@ subsurface_commit(struct ds_subsurface *subsurface) { struct ds_surface *surface = subsurface->surface; struct ds_subsurface *child; + bool need_sync; - if (subsurface_is_synchronized(subsurface)) { + need_sync = subsurface_is_synchronized(subsurface); + + ds_dbg("ds_subsurface(%p) surface(%p) commit: need_sync(%d) has_cache(%d)", + subsurface, subsurface->surface, need_sync, subsurface->has_cache); + + if (need_sync) { surface_state_init(&subsurface->cached); surface_state_move(&subsurface->cached, &surface->pending); subsurface->has_cache = true; @@ -137,6 +143,11 @@ subsurface_parent_commit(struct ds_subsurface *subsurface, bool synchronized) { if (subsurface->current.x != subsurface->pending.x || subsurface->current.y != subsurface->pending.y) { + ds_inf("ds_subsurface(%p) surface(%p) request_move: old(%d,%d) new(%d,%d)", + subsurface, subsurface->surface, + subsurface->current.x, subsurface->current.y, + subsurface->pending.x, subsurface->pending.y); + subsurface->current.x = subsurface->pending.x; subsurface->current.y = subsurface->pending.y; @@ -192,6 +203,9 @@ subsurface_handle_set_position(struct wl_client *client, if (!subsurface) return; + ds_inf("ds_subsurface(%p) surface(%p) set_position: (%d,%d)", + subsurface, subsurface->surface, x, y); + subsurface->pending.x = x; subsurface->pending.y = y; } @@ -209,6 +223,10 @@ subsurface_handle_place_above(struct wl_client *client, return; sibling_surface = ds_surface_from_resource(sibling_resource); + + ds_inf("ds_subsurface(%p) surface(%p) place_above: sibling surface(%p)", + subsurface, subsurface->surface, sibling_surface); + if (sibling_surface == subsurface->parent) { node = &subsurface->parent->pending.subsurfaces_above; } @@ -243,6 +261,10 @@ subsurface_handle_place_below(struct wl_client *client, return; sibling_surface = ds_surface_from_resource(sibling_resource); + + ds_inf("ds_subsurface(%p) surface(%p) place_below: sibling surface(%p)", + subsurface, subsurface->surface, sibling_surface); + if (sibling_surface == subsurface->parent) { node = &subsurface->parent->pending.subsurfaces_below; } @@ -275,6 +297,9 @@ subsurface_handle_set_sync(struct wl_client *client, if (!subsurface) return; + ds_inf("ds_subsurface(%p) surface(%p) set_sync", + subsurface, subsurface->surface); + subsurface->synchronized = true; } @@ -288,6 +313,9 @@ subsurface_handle_set_desync(struct wl_client *client, if (!subsurface) return; + ds_inf("ds_subsurface(%p) surface(%p) set_desync", + subsurface, subsurface->surface); + if (subsurface->synchronized) { subsurface->synchronized = false; @@ -309,6 +337,9 @@ static const struct wl_subsurface_interface subsurface_impl = static void subsurface_destroy(struct ds_subsurface *subsurface) { + ds_inf("Destroy ds_subsurface(%p) surface(%p)", + subsurface, subsurface->surface); + wl_signal_emit_mutable(&subsurface->events.destroy, subsurface); if (subsurface->parent) @@ -437,6 +468,9 @@ subsurface_synchronized_commit(struct ds_subsurface *subsurface) struct ds_surface *surface = subsurface->surface; struct ds_subsurface *child; + ds_dbg("ds_subsurface(%p) surface(%p) synchronized commit", + subsurface, subsurface->surface); + if (subsurface->has_cache) { surface_state_move(&subsurface->cached, &surface->pending); surface_commit_state(surface, &subsurface->cached);