mozilla :: #apz

16 Feb 2017
21:46rbarkerkats, dvander: I stumbled across this while working on the compositor side dynamic toolbar: Does my description make sense and is switching it to use Endpoints the correct solution?
21:46firebotBug 1340301 NEW, APZCTreeManagerChild for Android GPU process needs to be callable from UI thread.
21:47katsrbarker: i think it makes sense but i haven't actually used endpoints myself yet so i'm not entirely sure
21:48katsfrom what i understand of them what you're proposing sounds reasonable
21:48rbarkerkats: I've had the pleasure already :)
21:48rbarkerkats: It how I get the UiCompositorController Child to be callable from the UI Thread.
21:51rbarkerfortunately it doesn't block the dynamic toolbar work since without the GPU process, we are accessing the APZCTreeManager directly. But I guess will need to be done before can get back to enabling the GPU process.
22:50dvanderrbarker: what two threads are getting connected in that case?
22:50rbarkerdvander: for android it will be UI thread to Compositor thread.
22:50rbarkerdvander: on android the controller thread is in the UI thread and not the main thread.
22:51dvanderrbarker: do we already have endpoints from ui to compositor?
22:51rbarkerdvander: yes, I had to use them for the UiCompositorController
22:51rbarkerdvander: for pause/resume etc.
22:52dvanderrbarker: hrm, dont we already have to carry that stuff over ipc for the compositor process?
22:53rbarkerdvander: which stuff? pause/resume ?
22:55dvanderrbarker: does android currently enable the gpu process?
22:55rbarkerdvander: no, that's what I'm working on.
22:55rbarkerdvander: but I need to make some changes to the dynamic toolbar first.
22:56dvanderrbarker: ohh, ok. sec
22:58dvanderohh - wait, I see
22:58dvanderthis apzchild is going to be on the main thread, not UI...
22:58rbarkerdvander: yep :)
22:58dvandergross :)
22:58dvanderrbarker: you might want to talk to rhunt
22:58dvanderhe designed this for the gpu process and iirc we knew this might happen
22:59dvanderbut, yes: having an endpoint from the main thread to ui is quite reasonable
22:59rbarkerdvander: okay. I'll talk to rhunt, thanks.
23:03rhuntrbarker: hello!
23:04rbarkerrhunt: hello, was just talking to d_vander about
23:04firebotBug 1340301 NEW, APZCTreeManagerChild for Android GPU process needs to be callable from UI thread.
23:04rbarkerrhunt: I was just trying to get a feel for if my solution was correct.
23:05rbarkerrhunt: basically using endpoints so I can initialize the APZCTreeManagerChild on the android UI thread.
23:06rhuntrbarker: does the main thread need to use apzctreemanagerchild at all on android?
23:07rbarkerrhunt: not that I could find. There was an MOZ_ASSERT(OnJavaUiThread) before each usage I could find.
23:08rbarkerrhunt: but I could have easily missed something.
23:08rhuntrbarker: so the gpu process initialization will happen on the main thread like usual, but then we'll construct a APZCTMChild on the Ui thread by sending an endpoint over there?
23:09rhuntjust making sure I understand
23:09rbarkerrhunt: well, I would create the APZCTMChild on main thread then Open it with end point on UI thread.
23:09rbarkerrhunt: much like the new UiCompositorController is done.
23:11rhuntrbarker: okay, yeah that makes sense to me
23:11rhuntthat sounds very reasonable, i can't think of any problems with that :)
23:12rbarkerrhunt: okay, I guess I will find out pretty quickly if any member functions are called from main thread :)
17 Feb 2017
No messages
Last message: 5 days and 28 minutes ago