/srv/irclogs.ubuntu.com/2014/03/12/#ubuntu-mir.txt

duflu_Oh, I just noticed the new trusty decorations. Very nice.01:44
=== duflu_ is now known as duflu
RAOFHey, is there any particular reason we don't run the valgrind tests on package build?01:45
mlankhorstprobably because nobody added it? :p06:49
=== yofel_ is now known as yofel
=== Wellark_ is now known as Wellark
anpok_good morning mir09:01
alan_ggood morning anpok_09:06
anpok_I would like to extend the way we store and change transformations of surfaces.09:08
anpok_In the example I wanted to implement in demo shell I want to make incremental increases of rotation angles around the z axis.09:08
alan_ganpok_: I think duflu has also been thinking along those lines09:10
anpok_since I also need the inverse of the whole transformation, I would refrain from exposing a transformation matrix..09:10
dufluWha? All I'm thinking is doc review right now :)09:10
anpok_so there are so many ways of storing transformations..09:10
dufluanpok_: I have a plan, and it looks nothing like the existing classes. Can you wait for me to propose an approach?09:11
anpok_and storage does not necessarily affect interface, but it does make certain interfaces simpler or harder to support..09:11
anpok_duflu: can I help some way?09:12
dufluanpok_: I'm in a mad rush to finish my work today, but I'm happy to talk about it another day...?09:12
dufluDo you need something that works soon?09:13
anpok_my relative coordinates and input events not being sent to the surface bug is right now in conflict with you recent changes..09:13
dufluanpok_: Oh. OK, which branch?09:14
anpok_https://code.launchpad.net/~andreas-pokorny/mir/fix-1261647/+merge/21024609:14
anpok_I basically now require the input::surface to provide a transformation matrix to get from screen frame to local frame09:15
anpok_I was curious about your branch.. curious in which direction it goes..09:16
dufluanpok_: Assume there will be no surface-specific transformation matrix at all. Per-surface transformations are very short-lived transient things better controlled by an external animation object. So for input just assume it's always simple and orthogonal a rectangle09:17
anpok_well I could imagine having objects in a scene that refer to the real surface to some degree, and those object contain the information about transformations09:18
anpok_but I wouldnt call those object animations09:18
dufluanpok_: The permanent surface transformation as far as input cares is just the size and position. That's a simple matrix you can generate if you need to.09:20
dufluRotations and slides however are more "view" things than "model" things so I'm trying to get those transformations out of the model (surface implementation classes)09:21
anpok_touch input works on the visual .. or view part of our model. it should use as much information as possible from that model09:22
anpok_I see that we have to split basicsurface09:22
anpok_but the android input stack needs to have access on the view model.. and not directly the surfaces09:23
dufluanpok_: If you generate a transformation matrix based on top_left() and size() then I guarantee that will be correct. Anything more complex like a rotation or a slide is too fast and too short-lived to be relevant to input09:23
anpok_but thats a shell decision09:24
dufluanpok_: Yeah it's a design decision that's actually Mir's responsibility as it relates to any-and-all shells. We should let shells do whatever they want too. I suggest if we do keep some transformation() methods then they will be for the exclusive use of input. However inputting to rotated or moving surfaces is not a useful feature to worry about right now.09:26
dufluThat's unrelated to screen rotation09:27
RAOFScaled surfaces - eg: pixel-doubled surfaces to handle HiDPI - need more input transformation than just top_left() and size().09:29
anpok_hm I thought a complete solution would be straight forward to implement.09:29
anpok_I mean.. by restricting two only three dimensions..09:30
anpok_s/two/to09:30
anpok_so the plan wasnt to have a surface model to communicate.. and a visual/scene model that refers to surfaces and contains the transformation and can be used to dispatch input and as base for rendering?09:31
dufluanpok_: BasicSurface has an arbitrary transformation() still, and if there's a good reason then it can keep it. Just that I want to keep the size and position out of that. Add it back in for input calculations if you need to... but I think that's dangerous because you're missing the extra information like how the whole screen is transformed09:31
anpok_hm but you still do make use of the transformation in the gl renderer?09:38
dufluRemember window decorations have to use the same BasicSurface::transformation() but they have their own size and position, so the matrix cannot contain scaling and position just for the client area09:38
dufluanpok_: Yes, the GLRenderer still uses Renderable::transformation() and will continue to for now09:38
dufluanpok_: Although in reality I would be happy to say that transformation() will always be the identity matrix. Real animations will be added in during composition/rendering09:40
dufluHmm, maybe09:42
anpok_sure that part I agree09:43
anpok_also the assumption that the caller would draw surfaces at -0.5,0.5 with a 1x1 quad..09:43
dufluanpok_: Actually if you go Compiz-style then the animation is returned from Renderable::transformation()09:44
anpok_sorry no compiz backlog here.. but animated scenegraphs..09:45
dufluanpok_: Yeah we can't use normalized coordinates. They make attaching correctly sized window decorations too hard. To make all decorations seamless they need to have identical coordinates to the surface itself, and use a scale that is in pixels (not in "surface widths")09:46
dufluanpok_: I think transforming input beyond size and position is not useful right now. Not only Unity doesn't need it, but no shell I've ever seen will need it. Screen rotation is of course separate and already done09:48
anpok_hm basically I thought that part is now better because the scene objects that we have now only provides the information without imposing a certain way of rendering09:48
anpok_sure, i just find it hard to see in which direction we are going..09:49
dufluanpok_: Also keep in mind the compositor/renderer may change the whole screen appearance like zooming out to a cube or sliding. In that case, to transform input properly you'd have to ask the renderer for the full matrix sequence and reverse-engineer it09:50
anpok_mps only show incremental steps that may or may not approach in the direction09:50
anpok_or just ask it to transform to local coordinates, which is simple if is encoded in a view model.. or if there are objects to talk about..09:51
dufluanpok_: Yeah it's hard to see the grand plan sometimes, and we often trip over each other.09:52
dufluanpok_: I would be reluctant to approve anything which requires matrix math in the CPU/BasicSurface. But I don't plan on removing Renderable::transformation() any time soon so you can still base the work on that09:53
dufluAlthough that matrix will always be identity really09:54
dufluPut another way, all information should flow from the scene to the compositor/renderer. We don't want it flowing the other way. It just means for input to "look right" the renderer has to keep the surface visually in line with the model (except during brief animations)09:58
anpok10:54 < duflu> Although that matrix will always be identity really10:05
anpok10:57 <anpok_> I think not much math is needed.. at least compared to for example a cache miss..10:05
anpokthe other topic I had in mind was changing MirMotionEvent .. it needs a client abi bump .. wasnt sure if that is worth the change.. I dropped unnecessary fields10:06
dufluSorry, busy finishing work for a while10:07
dufluI'll be back10:07
dufluanpok: Your comment from 10:57 never arrived here :)10:13
dufluLooks like Xchat timed out and reconnected10:13
dufluanpok: Extending *Event structures is unavoidable and I agree there's more information there than we use. But if it's an optional change we should defer the client ABI break for a later larger release. In the mean time you can safely rename the fields you think are unused to see if that causes an API break without breaking the ABI10:14
anpokok..10:18
anpokregarding matrix math .. i think it will be easy to have short cuts for the 90% cases.10:18
anpokthat dont involve any10:18
dufluanpok: If you do go down the road of translating input coords *completely* with the screen, then keep in mind you'll also have to reverse engineer the screen transformation and any temporary changes to it like cube mode or workspace sliding. I think it's a bad idea to do that. Better to stay with just size+position support10:18
dufluHah. I now realize why Compiz used relative motion for everything. So it didn't have to transform input10:20
dufluThat and the ability to rotate your cubes without hitting a screen edge10:20
dufluanpok: Any significant complexity needs an expected use case. If not in Unity then in other shells. I don't think there is a use case for complete reverse mapping on input coordinates with arbitrary transformations right now.10:22
dufluAnd you still don't have access to the renderer's display transformation (which you need)10:22
* duflu -> dinner10:25
=== alan_g is now known as alan_g|afk
=== alan_g|afk is now known as alan_g
=== alan_g is now known as alan_g|lunch
kgunnalf__: afternoon sir, let's say i wanted to run glmark2 on my nexus4...at the moment, what do i do ? :)13:29
alf__kgunn: bzr lp:glmark2, fix a line in the code (ask me then), ./waf configure --data-path=$(pwd)/data --with-flavors=mir-glesv2 , ./waf , build/src/glmark2-es2-mir13:32
alf__kgunn: of course you need to run it against usc or a demo server, as unity8 doesn't accept arbitrary connections13:32
kgunnalf__: thanks...13:33
* kgunn remembers waf defeating him some time ago13:33
alf__kgunn: http://paste.ubuntu.com/7079309/ is the change you need to make (before running waf)13:35
=== alan_g|lunch is now known as alan_g
mterryracarr_, with your greeter-configuration-for-mterry branch, what other changes do I need?  You had suggested there were other changes13:48
kgunnalf__: thanks...stuck in a uds session, will try when i free14:02
alf__kgunn: np14:02
greybackalf__: unity8 would probably accept it if you append "--desktop_file_hint=/usr/share/applications/calculator.desktop" to the glmark command14:05
greybackkgunn: ^^14:06
kgunnthank for the hot tip14:06
alf__greyback: glmark2 doesn't understand this command-line option14:07
=== dandrader is now known as dandrader|afk
greybackalf__: darn, it doesn't ignore it14:08
greybackalf__: this works: "/glmark2-es2-mir -- --desktop_file_hint=/usr/share/applications/calculator.desktop"14:22
greybackkgunn: ^^14:22
alf__greyback: interesting!14:22
=== dandrader|afk is now known as dandrader
kdubalan_g, how's this sound? https://code.launchpad.net/~kdub/mir/platform-specific-options/+merge/210500/comments/49632116:24
* alan_g looks16:24
alan_gkdub: I think there are more issues than I first realized16:37
kdubissues that are existing, because of the review, or both?16:39
kdubI suppose I wouldn't mind putting the logic in mir::DefaultServerConfiguration::DefaultServerConfiguration either16:40
alan_gWell, there's an issue that to do that you need mo::Configuration to support adding options.16:41
alan_gAnd that is at odds with users having a choice how to supply options16:42
alan_gThere's an existing issue that nothing says that mo::Configuration has to support the keys listed in its header16:43
kdubso, not forcing reliance on boost::program_options16:43
alan_gYeah, why not allow a hard-coded lookup table?16:44
alan_gIt is a convenience that we do command-line, environment and config files, not a requirement.16:45
kdubhardcoded lookup table of what?16:45
alan_gKey -> vaule16:45
alan_g*value16:45
kduboh, as an alternative implementation of option lookup16:46
alan_gYes. I can imagine most users of Mir don't want to allow all the options to be configured16:46
alan_gCould all your logic go into mo::DefaultConfiguration?16:47
kdubI think so16:48
kdubwell, hmm16:49
* alan_g thinks that would make the most sense16:51
kdubyeah, I think we should still make mo::Configuration::add_options boost-free though16:51
kdubthat way platform library wouldn't need boost::program_options, and the server-implementers wouldn't need it either16:52
kdubalan_g, the problem though is that we then need a comment in mo::Configuration that says16:53
kdub'make sure to load the platform stuff'16:53
kdubor to be more precise, 'make sure to load and set the platform-specific keys too'16:54
alan_gkdub: we shouldn't have mo::Configuration::add_options at all16:54
alan_gThat belongs in mo::DefaultConfiguration16:54
kdubwe need some interface for the platform to do add options, just because it dlsyms the function...16:55
kdubmaybe a std::function to do so or something16:55
alan_gWe need a comment that says "these keys are always required", "these keys are optional and needed by mesa/android", "other platforms need other keys"16:56
alan_gThe way your MP does it is fine (within DefaultConfiguration)16:57
alan_gWe don't need16:58
alan_gIf someone replaces Configuration then they have to reverse-engineer the options they need to support.17:00
alan_gWhile if someone uses our implementation it is all a bit nicer for them.17:01
=== dandrader is now known as dandrader|lunch
kdubmaybe we need two mo::Configurations, the user one and the platform one17:03
kduband the platform sets up its own mo::Configuration (no add_options) and supplies it to the server configuration17:03
kdubyeah, I kinda like that17:04
* alan_g wonders which of us has gone mad17:05
alan_gWhere do you think that the platform configuration gets its option values from?17:06
kdubit gets its keys and defaults from the platform, but the values are parsed from the environment/command-line/config-file17:08
alan_gAll the querying of command-line, environment and config is part of our default implementation of mo::Configuration17:08
alan_gNone of that is a requirement on an alternative implementation17:09
kdubright17:11
alan_gActually, I've just realized that your approach has bugs17:13
alan_gIf you add an option "vt" (say) in platform...17:14
alan_gand specify MIR_SERVER_VT=2 in the environment...17:14
alan_gthen the first time you parse the environment it won't be recognised...17:15
alan_gand an exception will be thrown by boost.Options17:15
kdubsure, but all the parsing is done before anything other than the options starts using it17:15
kdubI think there are better ways though17:15
kdublike, maybe I should pass argc/argv to the platform creation and let it decide what to from there17:16
kdubthe platforms each have their own options, parsed however they want to17:16
kduband the platforms can't see the server options, and the server can't see the platform ones17:17
kdubwith the downside being, we have to guard against option-name collisions17:17
alan_gOr we could "special case" the --platform-graphics-lib option and load the library (and ask for its options) before doing any parsing.17:19
alan_gSo, remove platform-graphics-lib as an option and, instead supply it via MIR_PLATFORM=android17:22
kdubI don't mind parsing the command line for it17:22
kdubessentially, that's whats being done in the MP now17:23
kdubthe_options() triggers a parse, and we get the graphics library name out, then we go and add the platform options, and reparse17:24
alan_gkdub: the problem comes with what I described above - you can't supply platform lib options in the environment17:24
kdubI don't see the problem17:25
kdubwe would parse the (command line and the environment and the config file) once to get the library name, then add the options, then parse those 3 again to fill in the other options17:25
alan_gIf, during that parse an option that isn't recognised (--vt) in my example. boost objects17:26
alan_gYou can make it ignore unknown command line arguments, but not in the environment17:27
kduboh, so boost can't ignore MIR_SERVER_VT on the first parse?17:27
alan_gExactly17:28
alan_gIt throws an exception17:28
kdubokay, I understand now17:28
alan_gIt is a PITA that we were forced to ignore unknown command-line options too17:29
kdubokay, so we could special case using MIR_PLATFORM (which both the client and server would listen to), or we could pass argc/argv to the platform creation17:29
alan_gI still think it best to handle all of it in mo::DefaultConfiguration - and just provide a way (like you do now) for the library to add options to the default17:32
kdubyeah, seems like it would keep the code all in one place better17:33
alan_gBut, for that, we can't get the platform by using boost.Options to parse the environment17:33
alan_gand get the platform17:33
rsalvetikdub: did you ever look at what would be needed for mir to support an external monitor when using the android backend?17:46
rsalvetiwas using the hdmi adapter yesterday with mako (android), worked nicely17:47
rsalvetiandroid basically just mirrors it17:47
kdubreally?17:47
kdubthats excellent then17:47
kdubI wouldn't have expected that, I think non-cloning would take some effort though17:48
rsalvetiyeah17:48
rsalvetikdub: just get http://www.amazon.com/gp/product/B00DWGB6CU/ref=oh_details_o00_s00_i01?ie=UTF8&psc=117:48
rsalvetiworks with mako, flo and hammerhead afaik17:48
rsalvetimaybe not hammerhead, but I know it works with mako and flo17:49
rsalvetinexus 10 also got a mini/micro hdmi port17:49
kdubyeah17:49
kdubwell, thats good news17:50
=== alan_g is now known as alan_g|walk
=== dandrader|lunch is now known as dandrader
mterryracarr_, with your greeter-configuration-for-mterry branch, what other changes do I need?  You had suggested there were other changes18:04
racarr_mterry: Hi!18:04
racarr_um18:04
mterryracarr_, something about needing something else in Mir land to work18:05
racarr_mterry: https://code.launchpad.net/~robertcarr/mir/remove-ensure-display-powered/+merge/20973418:05
mterryracarr_, hmm, I have that too18:05
racarr_mterry: And what is the behavior now?18:10
mterryracarr_, I didn't see a difference.  Screen still turned on when greeter came up.  Maybe I screwed up one of the merges18:10
mterryHad both your branches and changed unity8 to use right unity-mir method.  (I thought)18:10
racarr_hmm18:12
racarr_I guess maybe something extra is going on18:12
racarr_how can I reproduce?18:12
mterryracarr_, lp:~mterry/unity8/split should be enough18:12
mterryracarr_, though that doesn't have the edit necessary to use the right unity-mir call18:13
mterryI can give you that diff in a pastebin in a sec18:13
mterryracarr_, http://paste.ubuntu.com/7080641/18:14
racarr_mterry: Do I need to make any system configuration changes?18:15
mterryracarr_, naw18:15
racarr_awesome. will look soon18:16
mterryracarr_, you'll autologin into a unity8 shell.  Then try locking screen.  It will go black for a sec, then the backlight will come back on (I claim)18:16
racarr_not sure whats going on at this point so18:16
racarr_just going to have to poke around with GDB and logs and such18:16
mterryracarr_, when I'm done with some other work, I'll re-test myself in case I'm drunk18:16
racarr_mterry: It is almost 3 pm18:16
racarr_:p18:16
mterryracarr_, just an expression!  :)18:17
racarr_yeah no hurry, I am not going to get to it for at least a few hours. in the zone on some cursor stuff then lunch18:17
racarr_haha I know18:17
=== d-snp_ is now known as d-snp
kdubstarting to see why we don't have platform specific options yet19:39
kdubsometimes i load x86 mir on the phone, and then worry something has gone really wrong21:11
=== jibel_ is now known as jibel
=== cjohnston_ is now known as cjohnston
mterryracarr_, still here?  Testing with just your  remove-ensure-display-powered works for me now23:24
mterryracarr_, in my testing before, I had extracted your diff on top of 0.1.623:24
mterryracarr_, this time I used your branch as-is, and it worked23:24
racarr_mterry: Yay!23:36
racarr_Ok that should land soon23:36
mterryracarr_, oh!  my testing included your unity-mir changes too.  Let me test without to see if those are strictly necessary23:57
racarr_I think they are...23:58
mterryI believe it.  Just want to triple-confirm for my list of greeter-split branches23:58

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