{"action":"created","comment":{"url":"https://api.github.com/repos/AvaloniaUI/Avalonia/pulls/comments/242932336","pull_request_review_id":186554329,"id":242932336,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MjkzMjMzNg==","diff_hunk":"@@ -0,0 +1,23 @@\n+using Avalonia.Media;\n+\n+namespace Avalonia.VisualTree\n+{\n+    public interface IRenderTimeCriticalVisual\n+    {\n+        /// <summary>\n+        /// Checks if visual has time critical content. You need to call InvalidateVisual for this property to be re-queried.\n+        /// </summary>\n+        bool HasRenderTimeCriticalContent { get; }\n+        /// <summary>","path":"src/Avalonia.Visuals/VisualTree/IRenderTimeCriticalVisual.cs","position":11,"original_position":11,"commit_id":"06081183008a2a07ed2e788873048f08625b63d9","original_commit_id":"06081183008a2a07ed2e788873048f08625b63d9","user":{"login":"grokys","id":1775141,"node_id":"MDQ6VXNlcjE3NzUxNDE=","avatar_url":"https://avatars1.githubusercontent.com/u/1775141?v=4","gravatar_id":"","url":"https://api.github.com/users/grokys","html_url":"https://github.com/grokys","followers_url":"https://api.github.com/users/grokys/followers","following_url":"https://api.github.com/users/grokys/following{/other_user}","gists_url":"https://api.github.com/users/grokys/gists{/gist_id}","starred_url":"https://api.github.com/users/grokys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grokys/subscriptions","organizations_url":"https://api.github.com/users/grokys/orgs","repos_url":"https://api.github.com/users/grokys/repos","events_url":"https://api.github.com/users/grokys/events{/privacy}","received_events_url":"https://api.github.com/users/grokys/received_events","type":"User","site_admin":true},"body":"Nit: no newlines between properties","created_at":"2018-12-19T14:21:17Z","updated_at":"2018-12-19T14:25:11Z","html_url":"https://github.com/AvaloniaUI/Avalonia/pull/2185#discussion_r242932336","pull_request_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/pulls/2185","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/AvaloniaUI/Avalonia/pulls/comments/242932336"},"html":{"href":"https://github.com/AvaloniaUI/Avalonia/pull/2185#discussion_r242932336"},"pull_request":{"href":"https://api.github.com/repos/AvaloniaUI/Avalonia/pulls/2185"}}},"pull_request":{"url":"https://api.github.com/repos/AvaloniaUI/Avalonia/pulls/2185","id":239437214,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM5NDM3MjE0","html_url":"https://github.com/AvaloniaUI/Avalonia/pull/2185","diff_url":"https://github.com/AvaloniaUI/Avalonia/pull/2185.diff","patch_url":"https://github.com/AvaloniaUI/Avalonia/pull/2185.patch","issue_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/issues/2185","number":2185,"state":"open","locked":false,"title":"Introduced visuals that render themselves on the render thread","user":{"login":"kekekeks","id":1067584,"node_id":"MDQ6VXNlcjEwNjc1ODQ=","avatar_url":"https://avatars2.githubusercontent.com/u/1067584?v=4","gravatar_id":"","url":"https://api.github.com/users/kekekeks","html_url":"https://github.com/kekekeks","followers_url":"https://api.github.com/users/kekekeks/followers","following_url":"https://api.github.com/users/kekekeks/following{/other_user}","gists_url":"https://api.github.com/users/kekekeks/gists{/gist_id}","starred_url":"https://api.github.com/users/kekekeks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kekekeks/subscriptions","organizations_url":"https://api.github.com/users/kekekeks/orgs","repos_url":"https://api.github.com/users/kekekeks/repos","events_url":"https://api.github.com/users/kekekeks/events{/privacy}","received_events_url":"https://api.github.com/users/kekekeks/received_events","type":"User","site_admin":false},"body":"This is needed for displaying things like video output, animated images, foreign content from WritableBitmap, etc. The common thing about these usage scenarios is that they don't need the UI thread, but need a steady frame rate. \r\nSince render thread timer ticks independently from UI thread the \"render time critical\" visuals can update themselves even if UI thread is completely blocked by the user code.\r\n\r\nThe API looks like this:\r\n```cs\r\n    public interface IRenderTimeCriticalVisual\r\n    {\r\n        bool HasNewFrame { get; }\r\n        void ThreadSafeRender(DrawingContext context, Size logicalSize, double scaling);\r\n    }\r\n```\r\n\r\nThey are forced to have a separate layer since they are supposed to update very frequently.\r\n\r\nThis is DeferredRenderer implementation. For ImmediateRenderer I'm planning to connect it to the RenderLoop's Update and trigger Invalidate calls to the OS if the last frame had `IRenderTimeCriticalVisual` anywhere in the graph.","created_at":"2018-12-18T10:31:28Z","updated_at":"2018-12-19T14:25:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3d14ba6f7d006a5bb60bfc49d613980aed2ff486","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/pulls/2185/commits","review_comments_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/pulls/2185/comments","review_comment_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/issues/2185/comments","statuses_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/statuses/06081183008a2a07ed2e788873048f08625b63d9","head":{"label":"AvaloniaUI:critical-time-visual","ref":"critical-time-visual","sha":"06081183008a2a07ed2e788873048f08625b63d9","user":{"login":"AvaloniaUI","id":14075148,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MDc1MTQ4","avatar_url":"https://avatars3.githubusercontent.com/u/14075148?v=4","gravatar_id":"","url":"https://api.github.com/users/AvaloniaUI","html_url":"https://github.com/AvaloniaUI","followers_url":"https://api.github.com/users/AvaloniaUI/followers","following_url":"https://api.github.com/users/AvaloniaUI/following{/other_user}","gists_url":"https://api.github.com/users/AvaloniaUI/gists{/gist_id}","starred_url":"https://api.github.com/users/AvaloniaUI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AvaloniaUI/subscriptions","organizations_url":"https://api.github.com/users/AvaloniaUI/orgs","repos_url":"https://api.github.com/users/AvaloniaUI/repos","events_url":"https://api.github.com/users/AvaloniaUI/events{/privacy}","received_events_url":"https://api.github.com/users/AvaloniaUI/received_events","type":"Organization","site_admin":false},"repo":{"id":14964475,"node_id":"MDEwOlJlcG9zaXRvcnkxNDk2NDQ3NQ==","name":"Avalonia","full_name":"AvaloniaUI/Avalonia","private":false,"owner":{"login":"AvaloniaUI","id":14075148,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MDc1MTQ4","avatar_url":"https://avatars3.githubusercontent.com/u/14075148?v=4","gravatar_id":"","url":"https://api.github.com/users/AvaloniaUI","html_url":"https://github.com/AvaloniaUI","followers_url":"https://api.github.com/users/AvaloniaUI/followers","following_url":"https://api.github.com/users/AvaloniaUI/following{/other_user}","gists_url":"https://api.github.com/users/AvaloniaUI/gists{/gist_id}","starred_url":"https://api.github.com/users/AvaloniaUI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AvaloniaUI/subscriptions","organizations_url":"https://api.github.com/users/AvaloniaUI/orgs","repos_url":"https://api.github.com/users/AvaloniaUI/repos","events_url":"https://api.github.com/users/AvaloniaUI/events{/privacy}","received_events_url":"https://api.github.com/users/AvaloniaUI/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/AvaloniaUI/Avalonia","description":"A multi-platform .NET UI framework","fork":false,"url":"https://api.github.com/repos/AvaloniaUI/Avalonia","forks_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/forks","keys_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/teams","hooks_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/hooks","issue_events_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/issues/events{/number}","events_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/events","assignees_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/assignees{/user}","branches_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/branches{/branch}","tags_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/tags","blobs_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/git/refs{/sha}","trees_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/statuses/{sha}","languages_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/languages","stargazers_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/stargazers","contributors_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/contributors","subscribers_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/subscribers","subscription_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/subscription","commits_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/commits{/sha}","git_commits_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/git/commits{/sha}","comments_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/comments{/number}","issue_comment_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/issues/comments{/number}","contents_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/contents/{+path}","compare_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/merges","archive_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/downloads","issues_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/issues{/number}","pulls_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/pulls{/number}","milestones_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/milestones{/number}","notifications_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/labels{/name}","releases_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/releases{/id}","deployments_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/deployments","created_at":"2013-12-05T20:13:21Z","updated_at":"2018-12-19T09:04:25Z","pushed_at":"2018-12-19T07:53:15Z","git_url":"git://github.com/AvaloniaUI/Avalonia.git","ssh_url":"git@github.com:AvaloniaUI/Avalonia.git","clone_url":"https://github.com/AvaloniaUI/Avalonia.git","svn_url":"https://github.com/AvaloniaUI/Avalonia","homepage":"http://avaloniaui.net","size":60284,"stargazers_count":5573,"watchers_count":5573,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":506,"mirror_url":null,"archived":false,"open_issues_count":309,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":506,"open_issues":309,"watchers":5573,"default_branch":"master"}},"base":{"label":"AvaloniaUI:master","ref":"master","sha":"1478f066829c93f2c5ea6dbb929bfdcd70663405","user":{"login":"AvaloniaUI","id":14075148,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MDc1MTQ4","avatar_url":"https://avatars3.githubusercontent.com/u/14075148?v=4","gravatar_id":"","url":"https://api.github.com/users/AvaloniaUI","html_url":"https://github.com/AvaloniaUI","followers_url":"https://api.github.com/users/AvaloniaUI/followers","following_url":"https://api.github.com/users/AvaloniaUI/following{/other_user}","gists_url":"https://api.github.com/users/AvaloniaUI/gists{/gist_id}","starred_url":"https://api.github.com/users/AvaloniaUI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AvaloniaUI/subscriptions","organizations_url":"https://api.github.com/users/AvaloniaUI/orgs","repos_url":"https://api.github.com/users/AvaloniaUI/repos","events_url":"https://api.github.com/users/AvaloniaUI/events{/privacy}","received_events_url":"https://api.github.com/users/AvaloniaUI/received_events","type":"Organization","site_admin":false},"repo":{"id":14964475,"node_id":"MDEwOlJlcG9zaXRvcnkxNDk2NDQ3NQ==","name":"Avalonia","full_name":"AvaloniaUI/Avalonia","private":false,"owner":{"login":"AvaloniaUI","id":14075148,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MDc1MTQ4","avatar_url":"https://avatars3.githubusercontent.com/u/14075148?v=4","gravatar_id":"","url":"https://api.github.com/users/AvaloniaUI","html_url":"https://github.com/AvaloniaUI","followers_url":"https://api.github.com/users/AvaloniaUI/followers","following_url":"https://api.github.com/users/AvaloniaUI/following{/other_user}","gists_url":"https://api.github.com/users/AvaloniaUI/gists{/gist_id}","starred_url":"https://api.github.com/users/AvaloniaUI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AvaloniaUI/subscriptions","organizations_url":"https://api.github.com/users/AvaloniaUI/orgs","repos_url":"https://api.github.com/users/AvaloniaUI/repos","events_url":"https://api.github.com/users/AvaloniaUI/events{/privacy}","received_events_url":"https://api.github.com/users/AvaloniaUI/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/AvaloniaUI/Avalonia","description":"A multi-platform .NET UI framework","fork":false,"url":"https://api.github.com/repos/AvaloniaUI/Avalonia","forks_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/forks","keys_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/teams","hooks_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/hooks","issue_events_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/issues/events{/number}","events_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/events","assignees_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/assignees{/user}","branches_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/branches{/branch}","tags_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/tags","blobs_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/git/refs{/sha}","trees_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/statuses/{sha}","languages_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/languages","stargazers_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/stargazers","contributors_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/contributors","subscribers_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/subscribers","subscription_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/subscription","commits_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/commits{/sha}","git_commits_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/git/commits{/sha}","comments_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/comments{/number}","issue_comment_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/issues/comments{/number}","contents_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/contents/{+path}","compare_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/merges","archive_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/downloads","issues_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/issues{/number}","pulls_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/pulls{/number}","milestones_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/milestones{/number}","notifications_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/labels{/name}","releases_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/releases{/id}","deployments_url":"https://api.github.com/repos/AvaloniaUI/Avalonia/deployments","created_at":"2013-12-05T20:13:21Z","updated_at":"2018-12-19T09:04:25Z","pushed_at":"2018-12-19T07:53:15Z","git_url":"git://github.com/AvaloniaUI/Avalonia.git","ssh_url":"git@github.com:AvaloniaUI/Avalonia.git","clone_url":"https://github.com/AvaloniaUI/Avalonia.git","svn_url":"https://github.com/AvaloniaUI/Avalonia","homepage":"http://avaloniaui.net","size":60284,"stargazers_count":5573,"watchers_count":5573,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":506,"mirror_url":null,"archived":false,"open_issues_count":309,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":506,"open_issues":309,"watchers":5573,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AvaloniaUI/Avalonia/pulls/2185"},"html":{"href":"https://github.com/AvaloniaUI/Avalonia/pull/2185"},"issue":{"href":"https://api.github.com/repos/AvaloniaUI/Avalonia/issues/2185"},"comments":{"href":"https://api.github.com/repos/AvaloniaUI/Avalonia/issues/2185/comments"},"review_comments":{"href":"https://api.github.com/repos/AvaloniaUI/Avalonia/pulls/2185/comments"},"review_comment":{"href":"https://api.github.com/repos/AvaloniaUI/Avalonia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AvaloniaUI/Avalonia/pulls/2185/commits"},"statuses":{"href":"https://api.github.com/repos/AvaloniaUI/Avalonia/statuses/06081183008a2a07ed2e788873048f08625b63d9"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"grokys"}}