Mir

Merge lp://qastaging/~mir-team/mir/add-client-cursor-conf-from-argb into lp://qastaging/mir

Proposed by Robert Carr
Status: Work in progress
Proposed branch: lp://qastaging/~mir-team/mir/add-client-cursor-conf-from-argb
Merge into: lp://qastaging/mir
Diff against target: 433 lines (+274/-29)
8 files modified
client-ABI-sha1sums (+1/-1)
include/client/mir_toolkit/mir_cursor_configuration.h (+16/-0)
src/client/cursor_configuration.h (+23/-3)
src/client/mir_cursor_api.cpp (+70/-22)
src/client/mir_surface.cpp (+20/-2)
src/protobuf/mir_protobuf.proto (+9/-1)
src/server/frontend/session_mediator.cpp (+56/-0)
tests/acceptance-tests/test_client_cursor_api.cpp (+79/-0)
To merge this branch: bzr merge lp://qastaging/~mir-team/mir/add-client-cursor-conf-from-argb
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Robert Carr (community) Abstain
Review via email: mp+242832@code.qastaging.launchpad.net

This proposal supersedes a proposal from 2014-11-24.

Commit message

Add a method for clients to upload ARGB cursor images from pixel data.

Description of the change

Add a method for clients to upload ARGB cursor images from pixel data. Previously noted as required, just not added. Doing now to enable nested cursor API passthrough (user session would be responsible for loading cursor themes and pass images up to USC...), and complete Qt cursor support.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Chris Halse Rogers (raof) wrote : Posted in a previous version of this proposal

Hm. Could this instead be

MirSurface* create_cursor_surface();

MirCursorConfiguration* mir_cursor_configuration_from_surface(MirSurface, hotspot_x, hotspot_y)?

Revision history for this message
Robert Carr (robertcarr) wrote :

Hey Chris, I started taking a stab at it this morning...the more I thought about it the less im convinced it's what we want though.

From the client perspective, the surface API is a little more difficult:
1. Create cursor-image-surface
2. Map cursor-image-surface and copy contents
3. Swap buffers
4. Attach cursor-imagesurface to cursor configuration and cursor configuration to surface

vs.

1. Create cursor conf with contents
2. Attach cursor conf to surface.

What does the client gain from the more difficult API though? my perspective is not much...besides perhaps pixel format negotiation.

Once I noticed this I started thinking about if it was really a surface? I think it bears some resemblance to a surface as it is a format of buffer upload to the server...but I think it omits the key aspects of a surface:

1. Presence in scene
2. Frame synchronization/buffer exchange ala frame-dropping is always on for cursor-image-surfaces.
3. Attribute/state-fullness, e.g. cursor upload is fire and forget

Maybe I am missing a benefit to having it represented as a surface. Maybe the alarming bit is that it isn't using MirPixelFormat, etc? Perhaps with a few tweaks it could be mir_cursor_configuration_from_graphics_region

Let me know what you think. Thanks :)

review: Approve
Revision history for this message
Robert Carr (robertcarr) :
review: Abstain
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Unmerged revisions

2103. By Robert Carr

Fix pointer arithmetic

2102. By Robert Carr

Fix uninitialized memory

2101. By Robert Carr

Do not allow setting hotspot past bounds of cursor

2100. By Robert Carr

Only support default sized cursors

2099. By Robert Carr

Implement hotspot in raw image API

2098. By Robert Carr

First impl

2097. By Robert Carr

Test skeleton for image cursors

2096. By Robert Carr

Test skeleton for image cursors

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches