{"action":"created","issue":{"url":"https://api.github.com/repos/flutter/flutter/issues/24798","repository_url":"https://api.github.com/repos/flutter/flutter","labels_url":"https://api.github.com/repos/flutter/flutter/issues/24798/labels{/name}","comments_url":"https://api.github.com/repos/flutter/flutter/issues/24798/comments","events_url":"https://api.github.com/repos/flutter/flutter/issues/24798/events","html_url":"https://github.com/flutter/flutter/issues/24798","id":385012500,"node_id":"MDU6SXNzdWUzODUwMTI1MDA=","number":24798,"title":"GrContexts are getting out of sync in the engine","user":{"login":"goderbauer","id":1227763,"node_id":"MDQ6VXNlcjEyMjc3NjM=","avatar_url":"https://avatars2.githubusercontent.com/u/1227763?v=4","gravatar_id":"","url":"https://api.github.com/users/goderbauer","html_url":"https://github.com/goderbauer","followers_url":"https://api.github.com/users/goderbauer/followers","following_url":"https://api.github.com/users/goderbauer/following{/other_user}","gists_url":"https://api.github.com/users/goderbauer/gists{/gist_id}","starred_url":"https://api.github.com/users/goderbauer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goderbauer/subscriptions","organizations_url":"https://api.github.com/users/goderbauer/orgs","repos_url":"https://api.github.com/users/goderbauer/repos","events_url":"https://api.github.com/users/goderbauer/events{/privacy}","received_events_url":"https://api.github.com/users/goderbauer/received_events","type":"User","site_admin":false},"labels":[{"id":284438921,"node_id":"MDU6TGFiZWwyODQ0Mzg5MjE=","url":"https://api.github.com/repos/flutter/flutter/labels/engine","name":"engine","color":"003570","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-27T22:21:04Z","updated_at":"2018-11-27T23:59:45Z","closed_at":null,"author_association":"MEMBER","body":"(this was split off from https://github.com/flutter/flutter/issues/10895#issuecomment-441959065 and is paraphrasing what has been said in side-conversations with @chinmaygarde and @dnfield)\r\n\r\nAs @dnfield points out in the comment referenced above, The `GrContext`s used in the engine are getting out of sync:\r\n\r\nUIDartIsolate, DartIsolate, and IOManager want to get a GrContext in the constructor and they hold on to it in a read-only/private field. They all live potentially longer than the actual underlying GL Surface.\r\n\r\nAfter the refactoring in https://github.com/flutter/engine/commit/2bfb893cf39ef8455bf5cb87fbf3e14c410ad71a some code paths may never get a GrContext. This may negatively impact performance (e.g. disables async texture uploads).\r\n\r\nWe should ensure that there is one clear owner (PlatformView?) of GrContext that can destroy and replace it without causing other parts of the engine to go out of sync. \r\n\r\nRelated: In https://github.com/flutter/engine/blob/5bf4deb4353c1b25f9db8ded62207353040eb94f/lib/ui/painting/codec.cc#L69-L79 we are currently much more likely to go down the non-context path, which may come with a performance penalty (and also uncovered another bug https://github.com/flutter/flutter/issues/10895)"},"comment":{"url":"https://api.github.com/repos/flutter/flutter/issues/comments/442265081","html_url":"https://github.com/flutter/flutter/issues/24798#issuecomment-442265081","issue_url":"https://api.github.com/repos/flutter/flutter/issues/24798","id":442265081,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjI2NTA4MQ==","user":{"login":"dnfield","id":8620741,"node_id":"MDQ6VXNlcjg2MjA3NDE=","avatar_url":"https://avatars3.githubusercontent.com/u/8620741?v=4","gravatar_id":"","url":"https://api.github.com/users/dnfield","html_url":"https://github.com/dnfield","followers_url":"https://api.github.com/users/dnfield/followers","following_url":"https://api.github.com/users/dnfield/following{/other_user}","gists_url":"https://api.github.com/users/dnfield/gists{/gist_id}","starred_url":"https://api.github.com/users/dnfield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnfield/subscriptions","organizations_url":"https://api.github.com/users/dnfield/orgs","repos_url":"https://api.github.com/users/dnfield/repos","events_url":"https://api.github.com/users/dnfield/events{/privacy}","received_events_url":"https://api.github.com/users/dnfield/received_events","type":"User","site_admin":false},"created_at":"2018-11-27T23:59:45Z","updated_at":"2018-11-27T23:59:45Z","author_association":"MEMBER","body":"To clarify, it's _references_ to the `GrContext`that is manged by the `PlatformView` - not to suggest that there are multiple `GrContext` instances getting out of sync."}}
{"actor":{"display_login":"dnfield"}}