{"action":"created","issue":{"url":"https://api.github.com/repos/PistonDevelopers/conrod/issues/773","repository_url":"https://api.github.com/repos/PistonDevelopers/conrod","labels_url":"https://api.github.com/repos/PistonDevelopers/conrod/issues/773/labels{/name}","comments_url":"https://api.github.com/repos/PistonDevelopers/conrod/issues/773/comments","events_url":"https://api.github.com/repos/PistonDevelopers/conrod/issues/773/events","html_url":"https://github.com/PistonDevelopers/conrod/pull/773","id":169356793,"number":773,"title":"Add a new `render::OwnedPrimitives` type as an owned alternative to the `render::Primitives` type. Useful for threading the UI.","user":{"login":"mitchmindtree","id":4587373,"avatar_url":"https://avatars.githubusercontent.com/u/4587373?v=3","gravatar_id":"","url":"https://api.github.com/users/mitchmindtree","html_url":"https://github.com/mitchmindtree","followers_url":"https://api.github.com/users/mitchmindtree/followers","following_url":"https://api.github.com/users/mitchmindtree/following{/other_user}","gists_url":"https://api.github.com/users/mitchmindtree/gists{/gist_id}","starred_url":"https://api.github.com/users/mitchmindtree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitchmindtree/subscriptions","organizations_url":"https://api.github.com/users/mitchmindtree/orgs","repos_url":"https://api.github.com/users/mitchmindtree/repos","events_url":"https://api.github.com/users/mitchmindtree/events{/privacy}","received_events_url":"https://api.github.com/users/mitchmindtree/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-04T11:55:05Z","updated_at":"2016-08-05T06:39:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/PistonDevelopers/conrod/pulls/773","html_url":"https://github.com/PistonDevelopers/conrod/pull/773","diff_url":"https://github.com/PistonDevelopers/conrod/pull/773.diff","patch_url":"https://github.com/PistonDevelopers/conrod/pull/773.patch"},"body":"I started on this after overflowing the stack on main in a personal project with a particularly large GUI. In conrod the user builds new widgets by instantiating other widgets within the `Widget::update` method. This normally isn't an issue but can lead to very large stack sizes when the widget hierarchy gets very deep. Rust currently does not provide a portable way of requesting a greater stack size for the main thread, however it does for spawning child threads. This lead me to want to instantiate the `Ui` on a dedicated thread (with a larger stack size), which in turn lead me to requiring an \"owned\" version of the `Primitives` type so that I could still send rendering data to main.\r\n\r\nThis also removes the `image::Map` field from the Primitives type in favour of passing it directly to the backend as necessary. This simplifies cases where the `Ui` is running on a thread other than main. As a result however, there is no longer any way for the `image::Map` to notify the `Ui` of when a redraw is necessary due to some mutation of state. For now the user is required to manually check whether redraw is required via the `image::Map`'s `trigger_redraw` field (which will also need to be manually reset after drawing) until we can come up with a nicer automated solution.\r\n\r\nI also added new functions to the `piston` and `piston_draw` backends for drawing individual `Primitive`s."},"comment":{"url":"https://api.github.com/repos/PistonDevelopers/conrod/issues/comments/237768553","html_url":"https://github.com/PistonDevelopers/conrod/pull/773#issuecomment-237768553","issue_url":"https://api.github.com/repos/PistonDevelopers/conrod/issues/773","id":237768553,"user":{"login":"mitchmindtree","id":4587373,"avatar_url":"https://avatars.githubusercontent.com/u/4587373?v=3","gravatar_id":"","url":"https://api.github.com/users/mitchmindtree","html_url":"https://github.com/mitchmindtree","followers_url":"https://api.github.com/users/mitchmindtree/followers","following_url":"https://api.github.com/users/mitchmindtree/following{/other_user}","gists_url":"https://api.github.com/users/mitchmindtree/gists{/gist_id}","starred_url":"https://api.github.com/users/mitchmindtree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitchmindtree/subscriptions","organizations_url":"https://api.github.com/users/mitchmindtree/orgs","repos_url":"https://api.github.com/users/mitchmindtree/repos","events_url":"https://api.github.com/users/mitchmindtree/events{/privacy}","received_events_url":"https://api.github.com/users/mitchmindtree/received_events","type":"User","site_admin":false},"created_at":"2016-08-05T06:39:27Z","updated_at":"2016-08-05T06:39:27Z","body":"Just finished testing the new `OwnedPrimitives` type on a couple personal projects and it seems to be working nicely."}}
{"actor":{"display_login":"mitchmindtree"}}