Edje: Add clip as a property of a part description
authorJean-Philippe Andre <jp.andre@samsung.com>
Tue, 28 Apr 2015 09:56:02 +0000 (18:56 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Mon, 15 Jun 2015 07:59:41 +0000 (16:59 +0900)
commit75ec3a7338c9c2406d4765a4cc8247f72d6bec7b
tree2ce20dfa89b036f5d5326eadb4d9026da27f8309
parent02d825f116e3b791c784791b10cfe613c5f18385
Edje: Add clip as a property of a part description

Since masking, for performance and themeing reasons, it becomes
interesting to be able to switch clippers on the fly. In particular,
switching from an IMAGE mask to a standard RECT clipper can save a
lot of power when masking is not required.

This new flag "description.clip_to" will behave a bit like a mix of
rel.to and visible:

- It points to a part by name, just like part.clip_to. This will
  override the clipper set by the part, or override the default clipper.

- Like "visible", it can not be interpolated between two values, so
  it will switch only at the end of a transition.

- By default there is no clip override, which means Edje will fallback
  to the part's clipper, if any, or the base (group's) clipper.

NOTE:
- Since a clipper that does not clip anything becomes a standard object,
  it is visible and rendered. This will in 99.999% cases not be the
  intended behaviour. Currently we can simply use a transparent RECT
  in order to always have something clipped by the clipper, but this is
  a hack and this will trigger rendering of masks in their surfaces even
  when they are not actually used.
  Ideally, there should be a flag indicating to Edje & Evas that an object
  should be considered a clipper in all situations, and never be rendered
  on screen.

TODO:
- Support Edje Edit
- Add Embryo & Lua functions
- Add support in edje_convert
- Add Edje/Evas flag to mark objects as "no_render"

@feature
src/bin/edje/edje_cc_handlers.c
src/bin/edje/edje_cc_out.c
src/lib/edje/edje_calc.c
src/lib/edje/edje_data.c
src/lib/edje/edje_edit.c
src/lib/edje/edje_load.c
src/lib/edje/edje_private.h