{"action":"closed","issue":{"url":"https://api.github.com/repos/servo/servo/issues/15934","repository_url":"https://api.github.com/repos/servo/servo","labels_url":"https://api.github.com/repos/servo/servo/issues/15934/labels{/name}","comments_url":"https://api.github.com/repos/servo/servo/issues/15934/comments","events_url":"https://api.github.com/repos/servo/servo/issues/15934/events","html_url":"https://github.com/servo/servo/issues/15934","id":213958175,"number":15934,"title":"Create a dedicated channel for constellation -> embedder communication","user":{"login":"paulrouget","id":373579,"avatar_url":"https://avatars0.githubusercontent.com/u/373579?v=4","gravatar_id":"","url":"https://api.github.com/users/paulrouget","html_url":"https://github.com/paulrouget","followers_url":"https://api.github.com/users/paulrouget/followers","following_url":"https://api.github.com/users/paulrouget/following{/other_user}","gists_url":"https://api.github.com/users/paulrouget/gists{/gist_id}","starred_url":"https://api.github.com/users/paulrouget/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulrouget/subscriptions","organizations_url":"https://api.github.com/users/paulrouget/orgs","repos_url":"https://api.github.com/users/paulrouget/repos","events_url":"https://api.github.com/users/paulrouget/events{/privacy}","received_events_url":"https://api.github.com/users/paulrouget/received_events","type":"User","site_admin":false},"labels":[{"id":89384911,"url":"https://api.github.com/repos/servo/servo/labels/C-assigned","name":"C-assigned","color":"02d7e1","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":22,"created_at":"2017-03-14T03:22:35Z","updated_at":"2017-08-29T19:10:21Z","closed_at":"2017-08-29T19:10:21Z","body":"*This issue is part of an effort to improve Servo's embedding story. See https://github.com/paulrouget/servoshell/projects/2*\r\n\r\nFollow up of #15795.\r\n\r\nAs of now, Servo communicates with the embedder by calling the `WindowMethods`, in the main thread. These methods are called from the compositor, and the main thread is woken up via the compositor proxy.\r\n\r\nA subset of these methods are relevant to the compositor (`framebuffer_size()`, `window_rect()`, …) and some are not (`set_page_title()`, `status()`, …).\r\n\r\nAlso, some of these calls need to be synchronous (`framebuffer_size()`) some don't (`set_cursor()`).\r\n\r\nAs Alan noted in #15795:\r\n\r\n> this seems to be conflating two (at least conceptually) different threads: the compositor, and the embedding application\"\r\n\r\nSo to make the embedding API more sensible (separation of concerns), it would be great to have a dedicated mechanism for the constellation to communicate with the embedder.\r\n\r\nThis channel should be between the constellation and the embedder.\r\n\r\nWe would end up with 2 channels between the servo and the embedder: constellation -> embedder and compositor -> embedder. With the embedder code running in the main thread.\r\n\r\nIdeally, both channels would follow the same pattern: sync calls would be methods, async calls would be events, and the embedder would provide a mechanism to both channels to wake up the main thread.\r\n\r\nWe would need to identify in the current WindowMethods what falls under compositor and constellation concerns."}}
{"actor":{"display_login":"bors-servo"}}