On touch devices there is the normal gesture to touch on the screen and
hold until the drag operation started.
For users of a mouse there is the gesture of just click and drag the
mouse away.
This commit changes the behaviour of the start based on the device that
sent the event
We keep planes on the plane list to ensure a released plane is removed
from display - however this means that if a caller starts messing with
a plane after release, that it could potentially reposition a plane it
doesn't own anymore.
Use EINA_SAFETY macros to prevent this.
The release flag is actually less useful than the existing in_use flag
for determining if a plane is unused. If a new plane is assigned before
the next flip cleans up released planes, then it can point to a released
plane state, and both it and the previous user will be freed on the next
commit, leaking a plane.
Putting the flag in the plane structure fixes this while still allowing us
to keep released planes around to ensure a recently released plane is
cleared from atomic state.
If we don't do a flip test, the atomic state isn't updated. This fixes
a potential problem where the last operation in state preparation is
a release - the following commit wouldn't include state from the release.
This patch fixes plane_state values during atomic flip test for any
planes marked for release. When the fb_flip actually completes, we
will remove the marked plane(s) from the output.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
As we cannot immediately remove a plane from an output, due to needing
an atomic commit to actually remove the plane from screen, we can use
a 'release' flag to indicate that a given plane needs removal from the
screen during our next atomic commit.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
As we need to be able to commit a new plane state for any released
planes, we should not be removing them from the output list just yet.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Unfortunately the plane sized returned from the cursor plane query isn't
a limit, it's an exact size. Sometimes you can use a different size,
but that's completely hardware dependent - so stick to the advertised
size.
I think we're now at the point where the two paths are merged.
Still no atomic functionality because nothing assigned the primary plane,
so we have no atomic state to commit. The machinery should be in place
though.
We'll be doing tests as we build up plane state assignment. it's too late
to do anything about it if we fail here - failed tests will block plane
assignment in the first place so the scene graph knows it still has to
render those visual elements.
This will simplify a bunch of API that would otherwise have to pass in
both output and plane - and in some cases we might not have the output
handy anyway.