From: SooChan Lim Date: Tue, 21 Jun 2016 02:41:55 +0000 (+0900) Subject: Revert "Revert "tizen-extension: add tizen_viewport interface"" X-Git-Tag: submit/tizen/20160621.050533^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6706b2dbcd630fc6ac12d883b510b785ebc41fce;p=platform%2Fcore%2Fuifw%2Fwayland-extension.git Revert "Revert "tizen-extension: add tizen_viewport interface"" This reverts commit 6b36004f84226f057084154aa00afbe13041f7d0. Change-Id: I61ea0abad31e520ba9faa7f887cb15770ca112ff --- diff --git a/protocol/tizen-extension.xml b/protocol/tizen-extension.xml index 4e812ac..5cf2863 100644 --- a/protocol/tizen-extension.xml +++ b/protocol/tizen-extension.xml @@ -575,6 +575,7 @@ + @@ -590,6 +591,11 @@ + + + + + @@ -615,6 +621,185 @@ + + + + This is the alternative and convenient solution of wl_viewport to present + a subsurface on screen. + + The below five functions can be replaced with this interface. The below + functions will be ignored after applying this interface to a subsurface. + - wl_surface.set_buffer_transform + - wl_surface.set_buffer_scale + - wl_subsurface.set_position + - wl_viewport.set_source + - wl_viewport.set_destination + + wl_viewport.set_source is very complicated especially when the buffer of + wl_surface is transformed by wl_surface.set_buffer_transform. And when the + parent is resized, if we want to change the geometry of a subsurface also, + wl_subsurface.set_position and wl_viewport.set_destination should be called + everytime the parent is resized in client side. This makes difficult to + synchronize a parent surface and a subsurface on screen. + + tizen_viewport allows clients to set the relative geometry to a subsurface + in a parent surface. Whenever a parent surface is resized, the geometry of + a subsurface will be calculated, moved and resized automatically by a + compositor. + + The tizen_viewport is specified in the coordinates of a subsurface's parent. + + The below 3 functions don't consider the transform of a parent's surface. + - tizen_viewport.set_source + - tizen_viewport.set_destination + - tizen_viewport.set_destination_ratio + + However, tizen_destination_mode.follow_parent_transform is called, + tizen_viewport will consider the transform of a parent surface when applying + the destination mode to a subsurface. + + The destination will be cropped by a parent surface. + + The change will be applied when wl_surface.commit is called. + + + + + + + The accepted values for the transform parameter are the values for wl_output.transform + according to the output transform. + + The tizen_viewport.set_transform is applied only to itself. Basically it + doesn't effect the transform of its subsurfaces. That is, if 90 transform is + setted and its subsurface has 0 transform, its subsurface won't be + rotated. + + If need to rotate the subsurface depended on a parent surface, + tizen_viewport.follow_parent_transform will make it possible. + + + + + + + + The source rectangle won't be changed when a parent is resized. If it needs + to be changed, tizen_viewport.set_source should be called with new values. + + + + + + + + + + The destination rectangle won't be changed when a parent is resized. If it + needs to be changed, tizen_viewport.set_destination should be called with + new values. + + + + + + + + + + The destination rectangle of a subsurface will be automatically changed + when a parent is resized. This allows the real number between 0.0 and 1.0. + See wl_fixed_from_double and wl_fixed_to_double. + + + + + + + + + + + + + + + + + The destination rectangle will be automatically changed when a parent is + resized. When tizen_destination_mode.set is called, the value of + tizen_viewport.set_destination and tizen_viewport.set_destination_ratio + will be ignored. + + The destination of a subsurface is decided by the mode, ratio, scale, offset + and align values. The ratio, scale, offset and align will be applied + sequentially. + + The change will be applied when wl_surface.commit is called. + + + + + + + + + + + + + + + + + + + + The real transform of a subsurface is (parent's transform + subsurface's transform). + That is, the subsurface will be rotated automatically when the parent is rotated. + + + + + + + + + + + + This allows the real number. See wl_fixed_from_double and wl_fixed_to_double. + + + + + + + + This allows the real number. See wl_fixed_from_double and wl_fixed_to_double. + + + + + + + + This allows the real number between 0.0 and 1.0. See wl_fixed_from_double and + wl_fixed_to_double. + + + + + + + + + + + + + +