pepper: View update process refactoring
authorTaekyun Kim <tkq.kim@samsung.com>
Mon, 14 Sep 2015 08:51:23 +0000 (17:51 +0900)
committerTaekyun Kim <tkq.kim@samsung.com>
Mon, 14 Sep 2015 08:51:23 +0000 (17:51 +0900)
commitdb88e0e13aefd7f7ea0039e7c711439c5f111d1d
tree204d66d0573cca3f26632eb72b7449cd4898719b
parent49fcf6ddcf6d5653d20625d844f7463b15ad5dca
pepper: View update process refactoring

1. Repaint scheduling

Now, repaint is scheduled only when a view is marked as dirty.
We have four dirty flags.

PEPPER_VIEW_GEOMETRY_DIRTY : Position, Size, Transform
PEPPER_VIEW_ACTIVE_DIRTY   : Activeness state
PEPPER_VIEW_Z_ORDER_DIRTY  : Z order (stack order)
PEPPER_VIEW_CONTENT_DIRTY  : Content of the view (surface.commit)

2. Output Repaint

We update all views in the compositor before trying to repaint an output.
Views internal state (global transform, bounding region, opaque region...)
will get updated and damages will be generated on planes where the views
belong to.

3. View picking

Picking is done using internal state that was recently updated not using
current state to pick a view that is actually rendered on the picking area.
Current state might have been changed since last rendering.

However, input region test is done using last committed surface state, but
if the client is doing the commit in response to the frame callbacks, that
should not be a problem.

If we want to pick a view based on the current state, we have to update all
views first. If this behavior is needed, we have to make a new API.

4. Surface damage flush

Surface damage is modified to be flushed only when it is actually needed.

Change-Id: I643d8efbbc24d1d404b2209097c36f248e3a9fe0
src/lib/pepper/compositor.c
src/lib/pepper/output.c
src/lib/pepper/pepper-internal.h
src/lib/pepper/plane.c
src/lib/pepper/surface.c
src/lib/pepper/view.c