[01:32] annnd back [04:21] I just realized a great alternative to input-sender besides [04:21] copying InputDispatcher in to unity-mir lol [04:22] 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 it [04:22] via say...the_input_sender() with a small wrapper class [04:23] without exposing any of the android-deps. === chihchun_afk is now known as chihchun [09:04] alf__: 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:09] alan_g: I see it as an internal convenience mechanism for adding (simple) surface attributes and associated change notifications [09:15] alf__: I sometimes see it as an internal inconvenience mechanism. ;) [09:25] Saviq: Hi! Do you know if Gerry is around today? [09:27] alf__, it feels like he took a swap day today... but I'm not positive on that... [09:27] Saviq: thanks [09:28] Saviq: Do you know where the qt compositor branch is? [09:28] alf__, of unity8? [09:29] Saviq: yes [09:29] alf__, https://code.launchpad.net/~unity-team/unity8/mirCompositor [09:29] Saviq: great, thanks [09:29] alf__, mzanetti will be able to guide you through the branches, too [09:30] alf__, you can also always look at https://launchpad.net/~unity-team/+archive/phone-right-edge/+packages [09:30] alf__, and see that unity8 was built by recipe unity8-qtcompositor [09:30] alf__, and that, in turn, will tell you which branch it builds from :) [09:31] Saviq: ha ^ [09:33] :) [09:35] 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] alf__: hey. Ok, will take a look === alan_g is now known as alan_g|lunch === renato_ is now known as Guest34798 === alan_g|lunch is now known as alan_g [13:11] Hey folks! Can I get someone to review https://code.launchpad.net/~mterry/unity-system-compositor/kill-spinner/+merge/223837 ? [13:38] AlbertA: ^ would you mind ? [13:44] alan_g: alf__ racarr_ so dandrader and i were just chatting about inputsender branch [13:44] kgunn: ok [13:44] if we go back in time, reason for this was to avoid exposing android headers in our public includes.... [13:45] howerver, what are your thoughts on it compared to (vs.) input sender [13:45] being a large diff, that might bring in bugs [13:46] whereas exposing android headers would be a direct/proven path [13:46] ...and we're not exactly settling on inputsender [13:46] Why would we need to expose android headers? [13:47] alan_g, so that qtmir can replace android::InputDispatcher with its own thing [13:47] alan_g, not needing the input_sender interfaces then [13:47] right, sender is effectively a wrapper [13:47] alan_g, and the big mir changes that entails it [13:48] dandrader: is that really the _only_ reason ? avoiding the header thing for custom dispatcher [13:49] kgunn: I assume we are discussing in the context of rtm? [13:49] dandrader: 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] alf__: yes, well landing qtcomp for sure [13:50] alan_g, I didn't go through that branch. I just used the needed interfaces it provides. so can't comment on the rest [13:50] E.g. timer and scheduler classes being introduced in or moved to the wrong namespace [13:51] alan_g: kgunn: IIRC, originally what was needed was to be able to deregister fd handlers from the main loop [13:52] ah so there's a little more than the header sanitation issue [13:52] 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 refactoring [13:53] so 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:55] * kgunn has to google mikado game [13:55] I thought racarr_ was going to review this and propose a solution? [13:55] so that we unblock the qt compositor work and don't bring in any polemic mir changes [13:55] dandrader: kgunn: will exposing the android-input headers (even as "private") commit us in any way to continue using them? [13:56] alf__, you can remove them once mir API for doing the same (e.g. input_sender) is available [13:57] alf__, in order to not leave qtmir in the dark [13:57] kgunn: try googling "jeff langer mikado Method" [13:57] alan_g: kgunn: "langr" :) [13:57] dandrader: right, but begs the question...is it the right thing [13:57] to do [13:58] i suppose its not forced on anyone [13:58] e.g. only shells that wanna replace input dispatcher [13:58] the right thing to do is properly integrate our fork of android input into the rest of Mir [13:58] i gotta hop otp, bbian [13:58] oops/bbian/bbiab [14:00] * alan_g wonders if we achieved anything [14:00] alan_g, but do we have time to do the right thing? [14:02] dandrader: 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:04] I 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:05] alan_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 land [14:05] meaning landing input_sender post RTM [14:05] when-it's-done [14:07] dandrader: racarr_ was looking into this. What does he say? [14:08] alan_g, we will know once he starts his work-day today [14:09] I'm just getting freaked out about the impending deadline approaching and we still having qtcomp blocked === chihchun is now known as chihchun_afk === dandrader is now known as dandrader|afk [15:31] alf__: still there? [15:32] greyback: yes [15:32] alf__: just looking at https://code.launchpad.net/~afrantzis/mir/scene-elements/+merge/223822/comments/537129 [15:32] alf__: I don't quite understand the question. [15:32] greyback: ok [15:32] alf__:" compositor *has* to decide whether it's going to use a renderable or not when getting it" [15:33] could you rephrase please [15:34] alf__: directly I don't see any impact to QtComp with that change, since we don't use mir's Scene at all [15:34] and overall I think it's a good idea [15:37] 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] greyback: @we don't use mir's Scene at all, hmmm, hmmmmmmmm [15:38] greyback: so qt compositor itself will take care of telling surfaces when they are occluded? [15:38] alf__: it'll have to yes. === dandrader|afk is now known as dandrader [15:40] 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:41] greyback: (changing visibility will send an event to the client) [15:41] alf__: effectively yes [15:43] alf__: 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 filtering [15:44] greyback: well, the "scene" in mir is not a proper Scenegraph, so it doesn't have all the information to do the filtering [15:45] alf__: then with current mir arch, the compositor is the only thing which has the info to do the filtering, am I right? [15:47] greyback: yes (although the scene could do it for some cases) [15:49] dandrader: I have another solution for input sender [15:50] alan_g: ^ [15:50] kdub_: ^^ (discussion with greyback) [15:50] racarr_: \o/ [15:50] 1. Small input_dispatcher patcher in our tree that exposes like sendToTargets. [15:50] 2. Wrap InputDispatcher in our server configuraiton as [15:50] wait for it...the_input_sender [15:50] 3. Export that [15:51] 3. When non android input sender is ready [15:51] drop it in API compatible [15:53] alf__: I don't know what more I can say then :) [15:53] greyback, the thing I don't like about the scene having /all/ the information is scenarios where the compositor (the view) has some state [15:54] kdub_: IMO compositor should not have any state, only the scene should [15:54] racarr_: that sound like what I thought anpok tried to do before starting n unravelling the world [15:54] like, if you have some perspective that affects occlusion set in the compositor, then the compositor is the best to figure that out [15:54] But I've yet to understand why it doesn't work [15:54] alan_g: Ok I am 95% sure it can work... [15:54] and I thought [15:55] anpok just got excited by [15:55] tryinhg to "fix" everything [15:55] lol [15:55] i.e. eventually we really would like to chunk up input dispatcher [15:55] kdub_: 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] racarr_: make it so! [15:55] ;) [15:56] greyback, right, but that limits the flexibility you can have in putting stuff on the screen [15:56] alan_g: mm ill mp something today. [15:56] because you can only put on screen what is implemented/designated by the scene [15:56] whereas if you're given this universal idea of a scene, then you can shuffle it around however you want during the gl pass [15:56] racarr_: Sounds good [15:57] like, the compositor as 'the view' should have state, as long as that state applies only to how the view is seen [15:59] the visibility stuff is an example of how we can arrange state changes (like input stuff) when accessing the scene [16:00] I guess what I'm driving against is having stuff like 'spread' or 'zoom' as scene concepts [16:00] racarr_, 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:01] 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 anyway [16:01] kdub_: I worry if any visual state is defined in the compositor, then the input system will be lacking information [16:01] otherwise, yeah, it sounds like it would solve our problems [16:02] 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 scene [16:02] and input is happy [16:02] dandrader: Hmm...right... [16:02] dandrader: Would it be enough to use [16:02] the_input_filter? [16:02] kdub_: fed back. So compositor writes to the scene? [16:03] it will get all the events....and can drop them from the normal dispatch [16:03] by "handling them" [16:03] then reinject them to a specific channel [16:03] if they come back out of Qt [16:03] greyback, it has to get the info there, kinda like the visibility stuff [16:03] and so I guess the scene then has the info, but its more generic [16:04] racarr_, sounds good. question is: how much effort is required to come up with such MP? [16:04] kdub_: if the scene had all the visual state itself, then the scene has enough info to determine visibility [16:04] and compositor doesn't need to "feed back" - just needs to render what it is told to render [16:04] greyback: "I guess if Qt's Scenegraph is powerful enough to represent all views we need to support for unity8" -> is it? [16:04] racarr_, does this the_input_filter already exist? [16:04] dandrader: I think like 2-3 hours :) [16:05] the_input_filter does exist [16:05] the input dispatcher patch...I think I found a quite easy approach [16:05] that will let both work [16:05] and then [16:05] the_input_sender itself is the same interface [16:05] as from anpoks mp [16:05] racarr_, it's too good to be true :) [16:05] greyback, but what about simple vs complex compositors [16:05] alf__: sorry, missed that. I've not encountered any design request that QML was unable to do yet [16:05] it seems so doesnt it lol [16:06] dandrader: Anyway im going to give it a try today and get a proposal up then on monday [16:06] maybe anpok will have a stroke of brilliance and input sender will be instantly ready [16:07] and if not we can land this and it will be ABI compatible [16:07] racarr_, the simpler the better [16:07] 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] :) [16:07] dandrader: For the actual injection, surface->consume(event) like in input sender is enough right? [16:08] 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] No extra flags or anything [16:08] racarr_, yeah surface->consume(event) would be the best API. [16:09] alf__: 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 hidden [16:09] Ok! will get on it as soon as the coffee kicks in [16:09] :) [16:10] 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 ideas [16:10] kdub_: then building a scene into Mir at all is doomed. How it be both simple and complex? [16:11] kdub_: QtComp isn't using Mir's scene, because Mir's scene is too basic [16:11] greyback: go not to the elves for counsel, for they will say both no and yes [16:11] alf__: :D [16:11] kgunn: Just to fill you in, have a new input sender theory [16:12] 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 compositors [16:12] That's the great thing about trees lol [16:13] kgunn: Basically patch our input dispatcher to support what they need [16:13] expose it via mir::InputSender [16:13] ABI compatible when anpoks stuff is done [16:14] kdub_: those terms sounds contradictory to me, but perhaps there is a middle-ground [16:14] I hope you enjoy challenges ;) [16:14] I don't think its contradictory! [16:14] QML isn't hard for simple apps. [16:14] 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:15] alf__: exactly that [16:15] kgunn: Did spend time reviewing input-sender... [16:16] it does seem roughly correct, but there are...um [16:16] on the order of dozens of small issues [16:16] which in a normal situation we would block review with [16:16] which makes it kind of hard [16:16] to convince yourself there aren't major problems because of all the minor problem noise [16:17] sooooo....I think we would be luckly to land it by next week. [16:17] confidently land it [16:17] * kdub_ has forgotten the original topic [16:18] kdub_: We were trying to make an alternative to X11 because its hard to extend. [16:18] :p [16:18] 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:19] alf__, right, sounds good to me [16:19] 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:20] kdub_: bottom line is that Qt compositor doesn't care about it at all at the moment :P [16:20] alf__: +1 from me too [16:22] 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] 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 frame [16:23] * kdub_ makes confusing sentence [16:23] alf__, I liked that your approach could only tell when things change [16:25] also, scene element might be a way to break Renderable::id() [16:31] racarr_: ack [16:31] racarr_: maybe with anpok back on monday and some review attention we can iterate more quickly [16:32] racarr_: dandrader was espousing earlier the idea that just exposing the android headers might not be less risky both in terms of time & bugs [16:32] and then switch when input-sender is ready [16:33] kgunn, s/might not be/might be [16:33] yes [16:33] sorry [16:33] exposing the android headers might _be_ less risky both in terms of time & bugs [16:35] slightly [16:35] the idea is this should not be very risky either [16:35] because its 99% the existing android code [16:35] so it just saves us exposing the headers I guess [16:36] right, I mean, an option that has the same risk [16:36] as exposing the android headers [16:36] but doesnt expose the headers [16:37] 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] is copy dandraders patched input dispatcher [16:37] in to our tree [16:37] expose it via the_input_sender (no android headers, small wrapper object...literally just a forwarder) [16:37] and allow selection of input dispatchers via something in the server configuration [16:37] that [16:38] doesn't require android headers...which is easy because its not arbitrary input dispatchers [16:38] just input dispatcher 1 v. 2 [16:38] kgunn: dandrader: ^ [16:38] So. I think that's better than exposing the android headers. [16:39] racarr_, 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] Yes [16:39] so it would be [16:39] an alternative input dispatcher [16:39] rather than replacing ours [16:40] but like I said I am very hopeful I can make an input dispatcher which will work in both modes [16:40] without much risk [16:41] well. it could replace ours at runtime, but I mean we could temporarily have both in tree [16:41] racarr_, having both in the tree sounds safer [16:41] but I think, taking the InputDispatcher and building it in our tree, then exposing it without android headers. [16:41] is better than [16:41] building it in your tree [16:41] just to prevent leaking [16:41] android any more and [16:41] right I mean its just slightly better [16:41] all around [16:41] ABI compatibility when input sender lands [16:41] etc [16:43] racarr_, 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 that [16:44] racarr_, resist coming up with a cleaner, more beautiful patch :) [16:46] Lol I guess you are right... there are so many member variables in InputDispatcher its basically impossible to "prove" that changing any one method [16:46] isn't going to subtly destroy everything [16:46] even if I have a strong suspiscion in this case lol...ive been known to be wrong [16:46] so um [ [16:46] we go with [16:46] copy your input dispatcher in to our tree [16:47] expose it via InputSender? [16:48] 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] because that is the part that offers events to the_input_filter [16:49] racarr_, it just doesn't [16:50] it doesn't? Where do events go out of the input reader then? [16:50] racarr_, well, in my original patch, there's a QtEventFeeder that gets the events from InputReader instead of InputDispatcher [16:51] racarr_, then eventually the forked InputDispatcher is told to send event X to channel Y and that's it [16:51] dandrader: Ok so to avoid exposing InputListenerInterface (interface from Reader->Dispatcher) [16:51] lets modify your forked inputdispatcher to hook up to the input reader again [16:51] but rip out ALL the logic [16:51] and it will just immediately [16:51] send the event [16:51] to the mir input filter [16:51] racarr_, right [16:53] ok :D [16:53] racarr_, it was like this https://docs.google.com/a/canonical.com/drawings/d/1tXs9s32ix5c_Iomj2TfGPgx615yCuadWRd1UTJKnbac/edit [16:54] mm. === 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