/srv/irclogs.ubuntu.com/2014/06/20/#ubuntu-mir.txt

racarr_annnd back01:32
racarr_I just realized a great alternative to input-sender besides04:21
racarr_copying InputDispatcher in to unity-mir lol04:21
racarr_it's also possible to just take the unity-mir InputDispatcher patches (for a certain kind of injection) in to our input dispatcher, and expose it04:22
racarr_via say...the_input_sender() with a small wrapper class04:22
racarr_without exposing any of the android-deps.04:23
=== chihchun_afk is now known as chihchun
alan_galf__: I don't really understand the motivation for the attributes mechanism: It uses values (index into the attribute array) in place of types which I guess allows some binary compatibility - but the way we use it hides that behind incompatible functions. (We have mir_surface_set_swapinterval() not mir_surface_set_attribute(...mir_surface_attrib_swapinterval...))09:04
alf__alan_g: I see it as an internal convenience mechanism for adding (simple) surface attributes and associated change notifications09:09
alan_galf__: I sometimes see it as an internal inconvenience mechanism. ;)09:15
alf__Saviq: Hi! Do you know if Gerry is around today?09:25
Saviqalf__, it feels like he took a swap day today... but I'm not positive on that...09:27
alf__Saviq: thanks09:27
alf__Saviq: Do you know where the qt compositor branch is?09:28
Saviqalf__, of unity8?09:28
alf__Saviq: yes09:29
Saviqalf__, https://code.launchpad.net/~unity-team/unity8/mirCompositor09:29
alf__Saviq: great, thanks09:29
Saviqalf__, mzanetti will be able to guide you through the branches, too09:29
Saviqalf__, you can also always look at https://launchpad.net/~unity-team/+archive/phone-right-edge/+packages09:30
Saviqalf__, and see that unity8 was built by recipe unity8-qtcompositor09:30
Saviqalf__, and that, in turn, will tell you which branch it builds from :)09:30
alf__Saviq: ha ^09:31
Saviq:)09:33
alf__greyback: Good morning! I have added as reviewer for https://code.launchpad.net/~afrantzis/mir/scene-elements/+merge/223822 . I don't need a code review (but you are welcome to do so), just a Qt compositor perspective on the approach (see comments).09:35
greybackalf__: hey. Ok, will take a look09:35
=== alan_g is now known as alan_g|lunch
=== renato_ is now known as Guest34798
=== alan_g|lunch is now known as alan_g
mterryHey folks!  Can I get someone to review https://code.launchpad.net/~mterry/unity-system-compositor/kill-spinner/+merge/223837 ?13:11
kgunnAlbertA: ^ would you mind ?13:38
kgunnalan_g: alf__ racarr_ so dandrader and i were just chatting about inputsender branch13:44
alan_gkgunn: ok13:44
kgunnif we go back in time, reason for this was to avoid exposing android headers in our public includes....13:44
kgunnhowerver, what are your thoughts on it compared to (vs.) input sender13:45
kgunnbeing a large diff, that might bring in bugs13:45
kgunnwhereas exposing android headers would be a direct/proven path13:46
kgunn...and we're not exactly settling on inputsender13:46
alan_gWhy would we need to expose android headers?13:46
dandraderalan_g, so that qtmir can replace android::InputDispatcher with its own thing13:47
dandraderalan_g, not needing the input_sender interfaces then13:47
kgunnright, sender is effectively a wrapper13:47
dandraderalan_g, and the big mir changes that entails it13:47
kgunndandrader: is that really the _only_ reason ? avoiding the header thing for custom dispatcher13:48
alf__kgunn: I assume we are discussing in the context of rtm?13:49
alan_gdandrader: I've not been following the branch closely but I don't understand why a custom dispatcher would need all the stuff that has aggregated there.13:49
kgunnalf__: yes, well landing qtcomp for sure13:49
dandraderalan_g, I didn't go through that branch. I just used the needed interfaces it provides. so can't comment on the rest13:50
alan_gE.g. timer and scheduler classes being introduced in or moved to the wrong namespace13:50
alf__alan_g: kgunn: IIRC, originally what was needed was to be able to deregister fd handlers from the main loop13:51
kgunnah so there's a little more than the header sanitation issue13:52
alf__alan_g: kgunn: but that led to further complexity added to MainLoop, and the decision was made to split things out (and Timer functionality too), as a refactoring13:52
dandraderso at this point, to make it for RTM, the safest approach, IMHO, would be to expose android-input headers as a "private API" (i.e. an exposed API that can/will change without further notice, "use it at your own risk")13:53
* alan_g thinks someone needs to be taught the "mikado game"13:53
* kgunn has to google mikado game13:55
alan_gI thought racarr_ was going to review this and propose a solution?13:55
dandraderso that we unblock the qt compositor work and don't bring in any polemic mir changes13:55
alf__dandrader: kgunn: will exposing the android-input headers (even as "private") commit us in any way to continue using them?13:55
dandraderalf__, you can remove them once mir API for doing the same (e.g. input_sender) is available13:56
dandraderalf__, in order to not leave qtmir in the dark13:57
alan_gkgunn: try googling "jeff langer mikado Method"13:57
alf__alan_g: kgunn: "langr" :)13:57
kgunndandrader: right, but begs the question...is it the right thing13:57
kgunnto do13:57
kgunni suppose its not forced on anyone13:58
kgunne.g. only shells that wanna replace input dispatcher13:58
alan_gthe right thing to do is properly integrate our fork of android input into the rest of Mir13:58
kgunni gotta hop otp, bbian13:58
kgunnoops/bbian/bbiab13:58
* alan_g wonders if we achieved anything14:00
dandraderalan_g, but do we have time to do the right thing?14:00
alan_gdandrader: Short term: I don't know. But this is a continuing drain of resources: do we have the time not to do the right thing?14:02
alan_gI don't have a strong position on anything except that the MP is currently in a state of confusion. It could be pragmatic to land and fix after.14:04
dandraderalan_g, I do think we have the time to go for the approach of exposing android-input headers until the input_sender work is shiny and ready to land14:05
dandradermeaning landing input_sender post RTM14:05
dandraderwhen-it's-done14:05
alan_gdandrader: racarr_ was looking into this. What does he say?14:07
dandraderalan_g, we will know once he starts his work-day today14:08
dandraderI'm just getting freaked out about the impending deadline approaching and we still having qtcomp blocked14:09
=== chihchun is now known as chihchun_afk
=== dandrader is now known as dandrader|afk
greybackalf__: still there?15:31
alf__greyback: yes15:32
greybackalf__: just looking at https://code.launchpad.net/~afrantzis/mir/scene-elements/+merge/223822/comments/53712915:32
greybackalf__: I don't quite understand the question.15:32
alf__greyback: ok15:32
greybackalf__:" compositor *has* to decide whether it's going to use a renderable or not when getting it"15:32
greybackcould you rephrase please15:33
greybackalf__: directly I don't see any impact to QtComp with that change, since we don't use mir's Scene at all15:34
greybackand overall I think it's a good idea15:34
alf__greyback: in the MP the compositor gets a sequence of all SceneElements (corresponding to surfaces) as distinct objects and can process them (e.g. mark them as occluded or rendered) at any convenient time during compositing. The alternative is for the scene to do the filtering, but that means that the compositor needs to know at the beginning which surfaces it will render and which not.15:37
alf__greyback: @we don't use mir's Scene at all, hmmm, hmmmmmmmm15:37
alf__greyback: so qt compositor itself will take care of telling surfaces when they are occluded?15:38
greybackalf__: it'll have to yes.15:38
=== dandrader|afk is now known as dandrader
alf__greyback: so I guess what's in devel right now (the ability to configure a surface attribute for visibility on the server) is enough for you?15:40
alf__greyback: (changing visibility will send an event to the client)15:41
greybackalf__: effectively yes15:41
greybackalf__: I like the idea of the compositor being pretty dumb, it should just render exactly the list of things it is given. So I'd prefer scene to do the filtering15:43
alf__greyback: well, the "scene" in mir is not a proper Scenegraph, so it doesn't have all the information to do the filtering15:44
greybackalf__: then with current mir arch, the compositor is the only thing which has the info to do the filtering, am I right?15:45
alf__greyback: yes (although the scene could do it for some cases)15:47
racarr_dandrader: I have another solution for input sender15:49
racarr_alan_g: ^15:50
alf__kdub_: ^^ (discussion with greyback)15:50
alan_gracarr_: \o/15:50
racarr_1. Small input_dispatcher patcher in our tree that exposes like sendToTargets.15:50
racarr_2. Wrap InputDispatcher in our server configuraiton as15:50
racarr_wait for it...the_input_sender15:50
racarr_3. Export that15:50
racarr_3. When non android input sender is ready15:51
racarr_drop it in API compatible15:51
greybackalf__: I don't know what more I can say then :)15:53
kdub_greyback, the thing I don't like about the scene having /all/ the information is scenarios where the compositor (the view) has some state15:53
greybackkdub_: IMO compositor should not have any state, only the scene should15:54
alan_gracarr_: that sound like what I thought anpok tried to do before starting n unravelling the world15:54
kdub_like, if you have some perspective that affects occlusion set in the compositor, then the compositor is the best to figure that out15:54
alan_gBut I've yet to understand why it doesn't work15:54
racarr_alan_g: Ok I am 95% sure it can work...15:54
racarr_and I thought15:54
racarr_anpok just got excited by15:55
racarr_tryinhg to "fix" everything15:55
racarr_lol15:55
racarr_i.e. eventually we really would like to chunk up input dispatcher15:55
greybackkdub_: right, but IMO that perspective should be defined in the scene, just executed by the compositor. Say if you do add that perspective just in the compositir, how then do you calculate the input destination?15:55
alan_gracarr_: make it so!15:55
alan_g;)15:55
kdub_greyback, right, but that limits the flexibility you can have in putting stuff on the screen15:56
racarr_alan_g: mm ill mp something today.15:56
kdub_because you can only put on screen what is implemented/designated by the scene15:56
kdub_whereas if you're given this universal idea of a scene, then you can shuffle it around however you want during the gl pass15:56
alan_gracarr_: Sounds good15:56
kdub_like, the compositor as 'the view' should have state, as long as that state applies only to how the view is seen15:57
kdub_the visibility stuff is an example of how we can arrange state changes (like input stuff) when accessing the scene15:59
kdub_I guess what I'm driving against is having stuff like 'spread' or 'zoom' as scene concepts16:00
dandraderracarr_, so we need two things. 1- get all input events out of InputReader, 2- ability to send an event to a given surface (actually its underlying input channel). your solution seems to take care of only item 2?16:00
alf__kdub_: greyback: I guess if Qt's Scenegraph is powerful enough to represent all views we need to support for unity8, then qt compositor won't care about compositor->scene communication anyway16:01
greybackkdub_: I worry if any visual state is defined in the compositor, then the input system will be lacking information16:01
dandraderotherwise, yeah, it sounds like it would solve our problems16:01
kdub_greyback, right, but the compositor is already mapping the surface from the 'universal' scene designation to the 'onscreen' mapping, so hopefully that information can just be fed back to the scene16:02
kdub_and input is happy16:02
racarr_dandrader: Hmm...right...16:02
racarr_dandrader: Would it be enough to use16:02
racarr_the_input_filter?16:02
greybackkdub_: fed back. So compositor writes to the scene?16:02
racarr_it will get all the events....and can drop them from the normal dispatch16:03
racarr_by "handling them"16:03
racarr_then reinject them to a specific channel16:03
racarr_if they come back out of Qt16:03
kdub_greyback,  it has to get the info there, kinda like the visibility stuff16:03
kdub_and so I guess the scene then has the info, but its more generic16:03
dandraderracarr_, sounds good. question is: how much effort is required to come up with such MP?16:04
greybackkdub_: if the scene had all the visual state itself, then the scene has enough info to determine visibility16:04
greybackand compositor doesn't need to "feed back" - just needs to render what it is told to render16:04
alf__greyback: "I guess if Qt's Scenegraph is powerful enough to represent all views we need to support for unity8" -> is it?16:04
dandraderracarr_, does this the_input_filter already exist?16:04
racarr_dandrader: I think like 2-3 hours :)16:04
racarr_the_input_filter does exist16:05
racarr_the input dispatcher patch...I think I found a quite easy approach16:05
racarr_that will let both work16:05
racarr_and then16:05
racarr_the_input_sender itself is the same interface16:05
racarr_as from anpoks mp16:05
dandraderracarr_, it's too good to be true :)16:05
kdub_greyback, but what about simple vs complex compositors16:05
greybackalf__: sorry, missed that. I've not encountered any design request that QML was unable to do yet16:05
racarr_it seems so doesnt it lol16:05
racarr_dandrader: Anyway im going to give it a try today and get a proposal up then on monday16:06
racarr_maybe anpok will have a stroke of brilliance and input sender will be instantly ready16:06
racarr_and if not we can land this and it will be ABI compatible16:07
dandraderracarr_, the simpler the better16:07
kdub_like, if someone doesn't need an animation/zoom/etc framework, but is given one by the scene, makes the usc-type compositors less possible (or at least less lightweight)16:07
racarr_:)16:07
racarr_dandrader: For the actual injection, surface->consume(event) like in input sender is enough right?16:07
alf__greyback: ok, do you need anything more from the visibility events side (as mentioned you can send occluded/exposed events to client surfaces with mir/devel)?16:08
racarr_No extra flags or anything16:08
dandraderracarr_, yeah surface->consume(event) would be the best API.16:08
greybackalf__: I don't think so. Note it is something we'd like working in USC, when split greeter lands it's a nice optimisation, so have unity8 notified it is hidden16:09
racarr_Ok! will get on it as soon as the coffee kicks in16:09
dandrader:)16:09
kdub_so, in summary, I guess I'm just interested in having the ideas in the scene be very generic, and the 'compositor' can set some of those generic ideas16:10
greybackkdub_: then building a scene into Mir at all is doomed. How it be both simple and complex?16:10
greybackkdub_: QtComp isn't using Mir's scene, because Mir's scene is too basic16:11
alf__greyback: go not to the elves for counsel, for they will say both no and yes16:11
greybackalf__: :D16:11
racarr_kgunn: Just to fill you in, have a new input sender theory16:11
kdub_greyback, i guess thats the challenge, to have the scene ideas be flexible enough to support the complex stuff without forcing requirements on the simple compositors16:12
racarr_That's the great thing about trees lol16:12
racarr_kgunn:  Basically patch our input dispatcher to support what they need16:13
racarr_expose it via mir::InputSender16:13
racarr_ABI compatible when anpoks stuff is done16:13
greybackkdub_: those terms sounds contradictory to me, but perhaps there is a middle-ground16:14
greybackI hope you enjoy challenges ;)16:14
racarr_I don't think its contradictory!16:14
racarr_QML isn't hard for simple apps.16:14
alf__greyback: how are you tracking server surfaces in qt compositor (e.g. do you intercept creation and attach the surface to your own/Qt's objects?)16:14
greybackalf__: exactly that16:15
racarr_kgunn: Did spend time reviewing input-sender...16:15
racarr_it does seem roughly correct, but there are...um16:16
racarr_on the order of dozens of small issues16:16
racarr_which in a normal situation we would block review with16:16
racarr_which makes it kind of hard16:16
racarr_to convince yourself there aren't major problems because of all the minor problem noise16:16
racarr_sooooo....I think we would be luckly to land it by next week.16:17
racarr_confidently land it16:17
* kdub_ has forgotten the original topic16:17
racarr_kdub_: We were trying to make an alternative to X11 because its hard to extend.16:18
racarr_:p16:18
alf__kdub_: greyback: well, ok, for the moment let's focus on something useful for USC and other simple compositors and try to gradually evolve it to something qt compositor can integrate with (it will take time).16:18
kdub_alf__, right, sounds good to me16:19
alf__kdub_: original topic was getting the Qt compositor perspective on exposing SceneElement objects vs the scene doing the filtering (your proposal in the comment)16:19
alf__kdub_: bottom line is that Qt compositor doesn't care about it at all at the moment :P16:20
greybackalf__: +1 from me too16:20
alf__kdub_: although I like the "tell don't ask" flavor of the scene doing the filtering, it seems from the conversation that exposing SceneElement gives us more flexibility for other use cases (like input)16:22
kdub_alf__, yeah, the thing I liked over my suggestion in your approach was that the visibility stuff can only be told on a change, instead of every frame16:22
* kdub_ makes confusing sentence16:23
kdub_alf__, I liked that your approach could only tell when things change16:23
kdub_also, scene element might be a way to break Renderable::id()16:25
kgunnracarr_: ack16:31
kgunnracarr_: maybe with anpok back on monday and some review attention we can iterate more quickly16:31
kgunnracarr_: dandrader was espousing earlier the idea that just exposing the android headers might not be less risky both in terms of time & bugs16:32
kgunnand then switch when input-sender is ready16:32
dandraderkgunn, s/might not be/might be16:33
kgunnyes16:33
kgunnsorry16:33
kgunnexposing the android headers might _be_ less risky both in terms of time & bugs16:33
racarr_slightly16:35
racarr_the idea is this should not be very risky either16:35
racarr_because its 99% the existing android code16:35
racarr_so it just saves us exposing the headers I guess16:35
racarr_right, I mean, an option that has the same risk16:36
racarr_as exposing the android headers16:36
racarr_but doesnt expose the headers16:36
racarr_is rather than make an input dispatcher that can function in both modes (which...again I dont think will be much more than exposing some stuff)16:37
racarr_is copy dandraders patched input dispatcher16:37
racarr_in to our tree16:37
racarr_expose it via the_input_sender (no android headers, small wrapper object...literally just a forwarder)16:37
racarr_and allow selection of input dispatchers via something in the server configuration16:37
racarr_that16:37
racarr_doesn't require android headers...which is easy because its not arbitrary input dispatchers16:38
racarr_just input dispatcher 1 v. 216:38
racarr_kgunn: dandrader: ^16:38
racarr_So. I think that's better than exposing the android headers.16:38
dandraderracarr_, beware that in my android::InputDispatcher fork I removed all the logic about android::InputDispatcher deciding what windows gets the incoming events. So it works only in "dumb" mode.  ie: "send this event to this channel"16:39
racarr_Yes16:39
racarr_so it would be16:39
racarr_an alternative input dispatcher16:39
racarr_rather than replacing ours16:39
racarr_but like I said I am very hopeful I can make an input dispatcher which will work in both modes16:40
racarr_without much risk16:40
racarr_well. it could replace ours at runtime, but I mean we could temporarily have both in tree16:41
dandraderracarr_, having both in the tree sounds safer16:41
racarr_but I think, taking the InputDispatcher and building it in our tree, then exposing it without android headers.16:41
racarr_is better than16:41
racarr_building it in your tree16:41
racarr_just to prevent leaking16:41
racarr_android any more and16:41
racarr_right I mean its just slightly better16:41
racarr_all around16:41
racarr_ABI compatibility when input sender lands16:41
racarr_etc16:41
dandraderracarr_,  the "one inputdispatcher that servers all modes" is an unproven approach. it might work, but it might not. I don't think we have time to experiment with that16:43
dandraderracarr_, resist coming up with a cleaner, more beautiful patch :)16:44
racarr_Lol I guess you are right... there are so many member variables in InputDispatcher its basically impossible to "prove" that changing any one method16:46
racarr_isn't going to subtly destroy everything16:46
racarr_even if I have a strong suspiscion in this case lol...ive been known to be wrong16:46
racarr_so um [16:46
racarr_we go with16:46
racarr_copy your input dispatcher in to our tree16:46
racarr_expose it via InputSender?16:47
racarr_How do you get the events out of InputReader in this setup...what does your patched dispatcher do when it gets events from the InputReader (where it would normally decide what windows get the events)16:48
racarr_because that is the part that offers events to the_input_filter16:48
dandraderracarr_, it just doesn't16:49
racarr_it doesn't? Where do events go out of the input reader then?16:50
dandraderracarr_, well, in my original patch, there's a QtEventFeeder that gets the events from InputReader instead of InputDispatcher16:50
dandraderracarr_, then eventually the forked InputDispatcher is told to send event X to channel Y and that's it16:51
racarr_dandrader: Ok so to avoid exposing InputListenerInterface (interface from Reader->Dispatcher)16:51
racarr_lets modify your forked inputdispatcher to hook up to the input reader again16:51
racarr_but rip out ALL the logic16:51
racarr_and it will just immediately16:51
racarr_send the event16:51
racarr_to the mir input filter16:51
dandraderracarr_, right16:51
racarr_ok :D16:53
dandraderracarr_, it was like this https://docs.google.com/a/canonical.com/drawings/d/1tXs9s32ix5c_Iomj2TfGPgx615yCuadWRd1UTJKnbac/edit16:53
racarr_mm.16:54
=== alan_g is now known as alan_g|EOW
=== renato_ is now known as Guest14152
=== dandrader is now known as dandrader|lunch
=== dandrader|lunch is now known as dandrader
=== dandrader is now known as dandrader|afk
=== dandrader|afk is now known as dandrader

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!