{"action":"created","comment":{"url":"https://api.github.com/repos/flutter/engine/pulls/comments/74837604","id":74837604,"diff_hunk":"@@ -0,0 +1,64 @@\n+// Copyright 2016 The Chromium Authors. All rights reserved.\n+// Use of this source code is governed by a BSD-style license that can be\n+// found in the LICENSE file.\n+\n+#include \"flutter/services/vsync/fallback/vsync_provider_fallback_impl.h\"\n+\n+#include \"base/bind.h\"\n+#include \"base/bind_helpers.h\"\n+#include \"base/message_loop/message_loop.h\"\n+\n+namespace sky {\n+namespace services {\n+namespace vsync {\n+\n+VsyncProviderFallbackImpl::VsyncProviderFallbackImpl(\n+    mojo::InterfaceRequest<::vsync::VSyncProvider> request)\n+    : binding_(this, request.Pass()),\n+      phase_(base::TimeTicks::Now()),\n+      armed_(false),\n+      weak_factory_(this) {}\n+\n+VsyncProviderFallbackImpl::~VsyncProviderFallbackImpl() = default;\n+\n+void VsyncProviderFallbackImpl::AwaitVSync(const AwaitVSyncCallback& callback) {\n+  pending_.emplace_back(std::move(callback));\n+  ArmIfNecessary();\n+}\n+\n+void VsyncProviderFallbackImpl::ArmIfNecessary() {\n+  if (armed_) {\n+    return;\n+  }\n+\n+  armed_ = true;\n+\n+  const base::TimeDelta interval = base::TimeDelta::FromSecondsD(1.0 / 60.0);\n+\n+  const base::TimeTicks now = base::TimeTicks::Now();\n+  const base::TimeTicks next = now.SnappedToNextTick(phase_, interval);","path":"services/vsync/fallback/vsync_provider_fallback_impl.cc","position":39,"original_position":39,"commit_id":"2bb3b08927235a847599bb5fbbbc0afdd0667145","original_commit_id":"2bb3b08927235a847599bb5fbbbc0afdd0667145","user":{"login":"abarth","id":112007,"avatar_url":"https://avatars.githubusercontent.com/u/112007?v=3","gravatar_id":"","url":"https://api.github.com/users/abarth","html_url":"https://github.com/abarth","followers_url":"https://api.github.com/users/abarth/followers","following_url":"https://api.github.com/users/abarth/following{/other_user}","gists_url":"https://api.github.com/users/abarth/gists{/gist_id}","starred_url":"https://api.github.com/users/abarth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abarth/subscriptions","organizations_url":"https://api.github.com/users/abarth/orgs","repos_url":"https://api.github.com/users/abarth/repos","events_url":"https://api.github.com/users/abarth/events{/privacy}","received_events_url":"https://api.github.com/users/abarth/received_events","type":"User","site_admin":false},"body":"I'm not sure how important quality is on platforms that lack a vsync signal, but this isn't the highest quality algorithm.  It's probably fine for our purposes though.","created_at":"2016-08-15T21:21:46Z","updated_at":"2016-08-15T21:21:46Z","html_url":"https://github.com/flutter/engine/pull/2927#discussion_r74837604","pull_request_url":"https://api.github.com/repos/flutter/engine/pulls/2927","_links":{"self":{"href":"https://api.github.com/repos/flutter/engine/pulls/comments/74837604"},"html":{"href":"https://github.com/flutter/engine/pull/2927#discussion_r74837604"},"pull_request":{"href":"https://api.github.com/repos/flutter/engine/pulls/2927"}}},"pull_request":{"url":"https://api.github.com/repos/flutter/engine/pulls/2927","id":81360219,"html_url":"https://github.com/flutter/engine/pull/2927","diff_url":"https://github.com/flutter/engine/pull/2927.diff","patch_url":"https://github.com/flutter/engine/pull/2927.patch","issue_url":"https://api.github.com/repos/flutter/engine/issues/2927","number":2927,"state":"open","locked":false,"title":"Rework frame pipelining and the animator to make it easier to wait of fences for frame completion.","user":{"login":"chinmaygarde","id":44085,"avatar_url":"https://avatars.githubusercontent.com/u/44085?v=3","gravatar_id":"","url":"https://api.github.com/users/chinmaygarde","html_url":"https://github.com/chinmaygarde","followers_url":"https://api.github.com/users/chinmaygarde/followers","following_url":"https://api.github.com/users/chinmaygarde/following{/other_user}","gists_url":"https://api.github.com/users/chinmaygarde/gists{/gist_id}","starred_url":"https://api.github.com/users/chinmaygarde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chinmaygarde/subscriptions","organizations_url":"https://api.github.com/users/chinmaygarde/orgs","repos_url":"https://api.github.com/users/chinmaygarde/repos","events_url":"https://api.github.com/users/chinmaygarde/events{/privacy}","received_events_url":"https://api.github.com/users/chinmaygarde/received_events","type":"User","site_admin":false},"body":"cc @abarth @jason-simmons \r\n\r\nI am not going to land this just yet. Have a another patch that deals with platform specific fences. But the basic concept is the same.\r\n\r\nHave also cleaned up the animator a bit. Will keep stress testing it some more but it seems to be holding up pretty well.\r\n\r\nAlso, `VSync` providers are now mandatory. But I realize not all platform may/can have actual vsync providers. So a fallback provider is not included. The mojo frame scheduler needs to be moved behind the same. Will do that in a final patch.\r\n","created_at":"2016-08-15T19:18:37Z","updated_at":"2016-08-15T21:21:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6e8f3f880b5dfe28552275322b14817ddb990c2c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/flutter/engine/pulls/2927/commits","review_comments_url":"https://api.github.com/repos/flutter/engine/pulls/2927/comments","review_comment_url":"https://api.github.com/repos/flutter/engine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flutter/engine/issues/2927/comments","statuses_url":"https://api.github.com/repos/flutter/engine/statuses/2bb3b08927235a847599bb5fbbbc0afdd0667145","head":{"label":"chinmaygarde:master","ref":"master","sha":"2bb3b08927235a847599bb5fbbbc0afdd0667145","user":{"login":"chinmaygarde","id":44085,"avatar_url":"https://avatars.githubusercontent.com/u/44085?v=3","gravatar_id":"","url":"https://api.github.com/users/chinmaygarde","html_url":"https://github.com/chinmaygarde","followers_url":"https://api.github.com/users/chinmaygarde/followers","following_url":"https://api.github.com/users/chinmaygarde/following{/other_user}","gists_url":"https://api.github.com/users/chinmaygarde/gists{/gist_id}","starred_url":"https://api.github.com/users/chinmaygarde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chinmaygarde/subscriptions","organizations_url":"https://api.github.com/users/chinmaygarde/orgs","repos_url":"https://api.github.com/users/chinmaygarde/repos","events_url":"https://api.github.com/users/chinmaygarde/events{/privacy}","received_events_url":"https://api.github.com/users/chinmaygarde/received_events","type":"User","site_admin":false},"repo":{"id":39225162,"name":"flutter_engine","full_name":"chinmaygarde/flutter_engine","owner":{"login":"chinmaygarde","id":44085,"avatar_url":"https://avatars.githubusercontent.com/u/44085?v=3","gravatar_id":"","url":"https://api.github.com/users/chinmaygarde","html_url":"https://github.com/chinmaygarde","followers_url":"https://api.github.com/users/chinmaygarde/followers","following_url":"https://api.github.com/users/chinmaygarde/following{/other_user}","gists_url":"https://api.github.com/users/chinmaygarde/gists{/gist_id}","starred_url":"https://api.github.com/users/chinmaygarde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chinmaygarde/subscriptions","organizations_url":"https://api.github.com/users/chinmaygarde/orgs","repos_url":"https://api.github.com/users/chinmaygarde/repos","events_url":"https://api.github.com/users/chinmaygarde/events{/privacy}","received_events_url":"https://api.github.com/users/chinmaygarde/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chinmaygarde/flutter_engine","description":"The Sky engine","fork":true,"url":"https://api.github.com/repos/chinmaygarde/flutter_engine","forks_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/forks","keys_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/teams","hooks_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/hooks","issue_events_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/issues/events{/number}","events_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/events","assignees_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/assignees{/user}","branches_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/branches{/branch}","tags_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/tags","blobs_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/statuses/{sha}","languages_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/languages","stargazers_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/stargazers","contributors_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/contributors","subscribers_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/subscribers","subscription_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/subscription","commits_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/contents/{+path}","compare_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/merges","archive_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/downloads","issues_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/issues{/number}","pulls_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/pulls{/number}","milestones_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/milestones{/number}","notifications_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/labels{/name}","releases_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/releases{/id}","deployments_url":"https://api.github.com/repos/chinmaygarde/flutter_engine/deployments","created_at":"2015-07-16T23:24:34Z","updated_at":"2016-01-11T21:26:09Z","pushed_at":"2016-08-15T19:14:05Z","git_url":"git://github.com/chinmaygarde/flutter_engine.git","ssh_url":"git@github.com:chinmaygarde/flutter_engine.git","clone_url":"https://github.com/chinmaygarde/flutter_engine.git","svn_url":"https://github.com/chinmaygarde/flutter_engine","homepage":null,"size":84112,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"flutter:master","ref":"master","sha":"9878b58878abe7e9bfed3e316420efb5e2934d04","user":{"login":"flutter","id":14101776,"avatar_url":"https://avatars.githubusercontent.com/u/14101776?v=3","gravatar_id":"","url":"https://api.github.com/users/flutter","html_url":"https://github.com/flutter","followers_url":"https://api.github.com/users/flutter/followers","following_url":"https://api.github.com/users/flutter/following{/other_user}","gists_url":"https://api.github.com/users/flutter/gists{/gist_id}","starred_url":"https://api.github.com/users/flutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flutter/subscriptions","organizations_url":"https://api.github.com/users/flutter/orgs","repos_url":"https://api.github.com/users/flutter/repos","events_url":"https://api.github.com/users/flutter/events{/privacy}","received_events_url":"https://api.github.com/users/flutter/received_events","type":"Organization","site_admin":false},"repo":{"id":39211337,"name":"engine","full_name":"flutter/engine","owner":{"login":"flutter","id":14101776,"avatar_url":"https://avatars.githubusercontent.com/u/14101776?v=3","gravatar_id":"","url":"https://api.github.com/users/flutter","html_url":"https://github.com/flutter","followers_url":"https://api.github.com/users/flutter/followers","following_url":"https://api.github.com/users/flutter/following{/other_user}","gists_url":"https://api.github.com/users/flutter/gists{/gist_id}","starred_url":"https://api.github.com/users/flutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flutter/subscriptions","organizations_url":"https://api.github.com/users/flutter/orgs","repos_url":"https://api.github.com/users/flutter/repos","events_url":"https://api.github.com/users/flutter/events{/privacy}","received_events_url":"https://api.github.com/users/flutter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/flutter/engine","description":"The Flutter engine","fork":false,"url":"https://api.github.com/repos/flutter/engine","forks_url":"https://api.github.com/repos/flutter/engine/forks","keys_url":"https://api.github.com/repos/flutter/engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flutter/engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flutter/engine/teams","hooks_url":"https://api.github.com/repos/flutter/engine/hooks","issue_events_url":"https://api.github.com/repos/flutter/engine/issues/events{/number}","events_url":"https://api.github.com/repos/flutter/engine/events","assignees_url":"https://api.github.com/repos/flutter/engine/assignees{/user}","branches_url":"https://api.github.com/repos/flutter/engine/branches{/branch}","tags_url":"https://api.github.com/repos/flutter/engine/tags","blobs_url":"https://api.github.com/repos/flutter/engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flutter/engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flutter/engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/flutter/engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flutter/engine/statuses/{sha}","languages_url":"https://api.github.com/repos/flutter/engine/languages","stargazers_url":"https://api.github.com/repos/flutter/engine/stargazers","contributors_url":"https://api.github.com/repos/flutter/engine/contributors","subscribers_url":"https://api.github.com/repos/flutter/engine/subscribers","subscription_url":"https://api.github.com/repos/flutter/engine/subscription","commits_url":"https://api.github.com/repos/flutter/engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/flutter/engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/flutter/engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/flutter/engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/flutter/engine/contents/{+path}","compare_url":"https://api.github.com/repos/flutter/engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flutter/engine/merges","archive_url":"https://api.github.com/repos/flutter/engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flutter/engine/downloads","issues_url":"https://api.github.com/repos/flutter/engine/issues{/number}","pulls_url":"https://api.github.com/repos/flutter/engine/pulls{/number}","milestones_url":"https://api.github.com/repos/flutter/engine/milestones{/number}","notifications_url":"https://api.github.com/repos/flutter/engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flutter/engine/labels{/name}","releases_url":"https://api.github.com/repos/flutter/engine/releases{/id}","deployments_url":"https://api.github.com/repos/flutter/engine/deployments","created_at":"2015-07-16T17:39:56Z","updated_at":"2016-08-15T16:42:31Z","pushed_at":"2016-08-15T19:18:37Z","git_url":"git://github.com/flutter/engine.git","ssh_url":"git@github.com:flutter/engine.git","clone_url":"https://github.com/flutter/engine.git","svn_url":"https://github.com/flutter/engine","homepage":"http://flutter.io","size":106668,"stargazers_count":892,"watchers_count":892,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":151,"mirror_url":null,"open_issues_count":1,"forks":151,"open_issues":1,"watchers":892,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flutter/engine/pulls/2927"},"html":{"href":"https://github.com/flutter/engine/pull/2927"},"issue":{"href":"https://api.github.com/repos/flutter/engine/issues/2927"},"comments":{"href":"https://api.github.com/repos/flutter/engine/issues/2927/comments"},"review_comments":{"href":"https://api.github.com/repos/flutter/engine/pulls/2927/comments"},"review_comment":{"href":"https://api.github.com/repos/flutter/engine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flutter/engine/pulls/2927/commits"},"statuses":{"href":"https://api.github.com/repos/flutter/engine/statuses/2bb3b08927235a847599bb5fbbbc0afdd0667145"}}}}
{"actor":{"display_login":"abarth"}}