/srv/irclogs.ubuntu.com/2014/05/23/#ubuntu-mir.txt

RAOFHm. Keyboard input is not _quite_ correct :)01:34
robert_ancellRAOF, there's no way in Mir to get a surface to render to that's not visible is there? i.e. surfaces are always mapped02:18
robert_ancellor duflu ^02:19
robert_ancellactually duflu. I was wondering why your Mir client examples render into a malloc'd buffer before copying into the one returned from mir_surface_get_graphics_region02:20
robert_ancellwhy not just rendering in mir_surface_get_graphics_region?02:20
robert_ancellwhy not just render into mir_surface_get_graphics_region I mean02:21
duflurobert_ancell: Buffers are not preserved. At least not unless guaranteed by buffer_age semantics. And if you do use buffer age then you still have to track N different buffers yourself in the toolkit/client02:23
dufluAlso, when I wrote fingerpaint, software clients were GPU-backed, not SHM. So reading back from a buffer was slower than it is now.02:24
robert_ancellduflu, mir_surface_get_graphics_region returns a new buffer right? And that is valid until mir_surface_swap_buffers is called?02:24
duflurobert_ancell: Sounds right...?02:25
duflurobert_ancell: Also, fingerpaint does that copy so it can remain dumb and not handle resizing :)02:25
robert_ancellok02:25
duflu.. whilst not deleting your painting02:25
robert_ancellthe names are really confusing - get_backend seems to imply that you're getting some singleton and swap buffers implies there are two buffers02:26
duflurobert_ancell: Given single-buffering support, fingerpaint wouldn't need that second malloc'd buffer02:26
robert_ancellduflu, so what happens in swap_buffers when you're single buffered?02:27
duflurobert_ancell: The latter issue is unfortunately a feature of OpenGL and many other graphics systems02:27
duflurobert_ancell: It would just tell the server to start displaying a new frame, and you pray (or time it carefully) to minimize client drawing at the same time. It would tear, but in some clients like fingerpaint not visibly02:27
robert_ancelland there'd be no swapping :)02:28
dufluOn the other hand, fingerpaint would still need the copy/other buffer to resize as well as it does now02:28
duflurobert_ancell: Yes, "swap" as a verb is misleading in the world of 3 or more buffers. But that's a common misnomer of OpenGL and all modern graphics systems02:29
robert_ancellin the case of buffers != 202:29
dufluYes single too02:30
robert_ancellyou should stop propogating the madness via the API...02:30
robert_ancellduflu, so my initial problem was GTK+ wants to start rendering before it's shown the window - is the only way to do this to rendering into some malloc'd memory (like in fingerpaint) and copy that into the graphics region once the window is shown?02:31
duflurobert_ancell: It was discussed, but no one has a better verb in mind. Particularly since the word "swap" is already known to graphics programmers02:31
robert_ancellfinish?02:31
robert_ancellpost?02:31
robert_ancellmark_ready?02:31
duflurobert_ancell: Actually there is a "hide" flag in the server. We presently lack client API to access it :)02:32
robert_ancellduflu, any reason not to expose it?02:32
duflurobert_ancell: Also, the compositor won't show your window till you've finished the frame (swapped)... so no problem?02:32
robert_ancellah, ok02:32
duflurobert_ancell: It's always hidden till one whole frame is finished02:33
robert_ancellduflu, we're double buffered by default right?02:33
duflurobert_ancell: Triple, everywhere02:33
dufluI'm working to re-enable double, but it requires lots of smarts to switch on demand02:34
robert_ancellso I shouldn't be able to add any flickering02:34
robert_ancellas long as my buffer contents are correct02:34
duflurobert_ancell: No, flickering/tearing is impossible (tm)02:34
robert_ancellI like that02:34
duflu... because the client is always drawing to a different buffer to that which is on screen02:35
robert_ancellduflu, do you get events on a surface before the first frame is drawn?02:35
robert_ancellduflu, and the triple buffer is so you can swap at any time without getting caught when the CRTC is reading out02:36
RAOFduflu: That's not _strictly_ accurate; misbehaving clients can tear, because they can keep a reference to the buffer they've submitted and continue drawing to it.02:37
RAOFBut they need to go to quite some lengths to do that :)02:38
robert_ancellRAOF, yeah, there's no API to hold onto a reference is there?02:38
RAOFWell, you can get the current buffer package, which contains (among other things) the fd for the current buffer and then use that fd whenever you want.02:39
robert_ancellyeah, I'm not going to do that02:39
RAOFBut you can't easily draw to that fd :)02:39
dufluIt would require a lot of madness, similar to XMir :)02:42
robert_ancellany ideas on if events get delivered to surfaces that haven't been shown?02:43
duflurobert_ancell: I think a surface could get events immediately before it is composited. But I'm not sure what events...02:43
robert_ancellI supose it could get resized02:44
dufluYes, the server/shell is free to resize at will. And the client has no choice02:44
duflufor now02:44
robert_ancellfor ever02:47
robert_ancellYou hope the shell is well behaved but it can do anything right?02:47
duflurobert_ancell: Maybe forever, don't know. Some clients might want to specify resize hints like "increments of a character" (terminal apps) or "fixed aspect ratio" (video)03:17
robert_ancellRAOF, is buffer age only supported on some backends? Why is it part of NativeBufferPackage and not in the main client API?03:36
RAOFbuffer age should be supported for all backends.03:36
* RAOF looks.03:36
robert_ancellI was expecting something like mir_surface_get_buffer_age ()03:38
robert_ancellHmm, I was assuming that NativeBuffer is not something you'd use for "normal" clients. Is that not the case?03:38
robert_ancellyes, because it would be something entirely different on Android03:39
RAOFWell, for normal clients you'd use EGL, and we'd expose buffer age that way.03:39
RAOF(Note: We do not yet expose buffer age through EGL_EXT_buffer_age ☺)03:40
robert_ancellha!03:40
RAOFBargh.04:09
RAOFWhy is INPUT_RECEIVER_REPORT=log going nowhere?04:09
robert_ancellSee y'all in Malta04:16
RAOFOk. So, that's correct rendering and inputish, but I need to deal with the “receives swap_complete events for dead surfaces” thing.04:36
racarr__RAOF: Rootless X?!04:38
RAOFracarr__: Indeed.04:39
racarr__yay04:39
RAOFIt's hacked up at the moment, so uuugly (and has probably broken rooted mode)04:40
RAOFBut I should learn how to mir_screencast04:40
RAOF;)04:40
dufluRAOF: I think the actual making video instructions are buried in email threads somewhere05:18
dufluwhich I can't access as I am busy transferring to the laptop05:19
dufluRAOF: https://lists.ubuntu.com/archives/mir-devel/2014-February/000650.html05:20
RAOFGood, good. Making mir_surface_is_valid unconditionally return false does make some tests fail.06:20
=== fginther` is now known as fginther
alf_anpok: @unregister-fd-handler, I wonder if using the main loop mechanism to handle the FDs for input is the way to go. Do we need total serialization of the messages?09:37
alf_anpok: I could imagine using a more focused class for this purpose (but I am not familiar with the details)09:38
alf_anpok: are these going through the server main loop, or will we have a different object?09:39
=== marlinc_ is now known as marlinc
anpokalf_: they do not have to go through the server main loop12:23
=== ara is now known as Guest58311
anpokalf_: https://code.launchpad.net/~andreas-pokorny/mir/unregister-fd-handler/+merge/220571/comments/52802012:55
=== jono is now known as Guest70896
mterrygreyback, got several related branchs for split I would love a review on today:  https://code.launchpad.net/~mterry/unity-mir/no-focus/+merge/220718  https://code.launchpad.net/~mterry/qtubuntu/greeter-is-shell/+merge/220543  and https://code.launchpad.net/~mterry/unity-mir/dont-hide-focused-apps/+merge/22013015:16
greybackmterry: I'm just about to head to airport, I'll try to review while in the lounge15:16
=== chihchun is now known as chihchun_afk
racarr__hmm21:00
racarr__the dithering is wrong21:00
racarr__in unity8-mir on my new21:01
racarr__laptop21:01
racarr__or21:01
racarr__something21:01
racarr__insane banding21:01

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