{"action":"created","comment":{"url":"https://api.github.com/repos/flutter/engine/pulls/comments/71054374","id":71054374,"diff_hunk":"@@ -0,0 +1,178 @@\n+/*\n+ * Copyright (c) 2016, Google Inc. All rights reserved.\n+ *\n+ * Redistribution and use in source and binary forms, with or without\n+ * modification, are permitted provided that the following conditions are\n+ * met:\n+ *\n+ *     * Redistributions of source code must retain the above copyright\n+ * notice, this list of conditions and the following disclaimer.\n+ *     * Redistributions in binary form must reproduce the above\n+ * copyright notice, this list of conditions and the following disclaimer\n+ * in the documentation and/or other materials provided with the\n+ * distribution.\n+ *     * Neither the name of Google Inc. nor the names of its\n+ * contributors may be used to endorse or promote products derived from\n+ * this software without specific prior written permission.\n+ *\n+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ */\n+\n+#import <Foundation/Foundation.h>\n+#import <CoreFoundation/CoreFoundation.h>\n+#import <CoreText/CoreText.h>\n+#import <UIKit/UIKit.h>\n+\n+#include \"sky/engine/platform/fonts/FontCache.h\"\n+#include \"sky/engine/platform/fonts/FontCache.h\"\n+#include \"base/mac/scoped_nsobject.h\"\n+#include \"base/lazy_instance.h\"\n+#include \"base/macros.h\"\n+#include \"base/logging.h\"\n+\n+namespace blink {\n+\n+template <class T>\n+class CFRef {\n+ public:\n+  CFRef() : _ref(nullptr) {}\n+\n+  CFRef(T t) : _ref(t) {}\n+\n+  CFRef(const CFRef&) = delete;\n+\n+  void operator=(const CFRef&) = delete;\n+\n+  CFRef(CFRef&& o) : _ref(o._ref) { o._ref = nullptr; }\n+\n+  void operator=(CFRef&& o) {\n+    _ref = o._ref;\n+    o._ref = nullptr;\n+  }\n+\n+  operator bool() const { return _ref != nullptr; }\n+\n+  T get() const { return _ref; }\n+\n+  ~CFRef() {\n+    if (_ref != nullptr) {\n+      CFRelease(reinterpret_cast<CFTypeRef>(_ref));\n+    }\n+  }\n+\n+ private:\n+  T _ref;\n+};","path":"sky/engine/platform/fonts/apple/FontCacheIOS.mm","position":75,"original_position":75,"commit_id":"050cab743dfdbf7706922eb7360f023d87e8003a","original_commit_id":"050cab743dfdbf7706922eb7360f023d87e8003a","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":"Sure. Though I don't see us using CF directly too often.","created_at":"2016-07-15T23:42:02Z","updated_at":"2016-07-15T23:42:02Z","html_url":"https://github.com/flutter/engine/pull/2800#discussion_r71054374","pull_request_url":"https://api.github.com/repos/flutter/engine/pulls/2800","_links":{"self":{"href":"https://api.github.com/repos/flutter/engine/pulls/comments/71054374"},"html":{"href":"https://github.com/flutter/engine/pull/2800#discussion_r71054374"},"pull_request":{"href":"https://api.github.com/repos/flutter/engine/pulls/2800"}}},"pull_request":{"url":"https://api.github.com/repos/flutter/engine/pulls/2800","id":77691950,"html_url":"https://github.com/flutter/engine/pull/2800","diff_url":"https://github.com/flutter/engine/pull/2800.diff","patch_url":"https://github.com/flutter/engine/pull/2800.patch","issue_url":"https://api.github.com/repos/flutter/engine/issues/2800","number":2800,"state":"open","locked":false,"title":"Attempt font fallback resolution using CoreText on iOS.","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":"","created_at":"2016-07-15T23:34:50Z","updated_at":"2016-07-15T23:42:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d2f1e55c49e88d3f4fffb30ac3e68e65a824b676","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/flutter/engine/pulls/2800/commits","review_comments_url":"https://api.github.com/repos/flutter/engine/pulls/2800/comments","review_comment_url":"https://api.github.com/repos/flutter/engine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flutter/engine/issues/2800/comments","statuses_url":"https://api.github.com/repos/flutter/engine/statuses/050cab743dfdbf7706922eb7360f023d87e8003a","head":{"label":"chinmaygarde:emoji","ref":"emoji","sha":"050cab743dfdbf7706922eb7360f023d87e8003a","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-07-15T23:33:26Z","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":82688,"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":"3291edef4172d81d5f24921f4e9a67dbd5406ead","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-07-13T13:36:08Z","pushed_at":"2016-07-15T23:34:50Z","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":105168,"stargazers_count":876,"watchers_count":876,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":147,"mirror_url":null,"open_issues_count":2,"forks":147,"open_issues":2,"watchers":876,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flutter/engine/pulls/2800"},"html":{"href":"https://github.com/flutter/engine/pull/2800"},"issue":{"href":"https://api.github.com/repos/flutter/engine/issues/2800"},"comments":{"href":"https://api.github.com/repos/flutter/engine/issues/2800/comments"},"review_comments":{"href":"https://api.github.com/repos/flutter/engine/pulls/2800/comments"},"review_comment":{"href":"https://api.github.com/repos/flutter/engine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flutter/engine/pulls/2800/commits"},"statuses":{"href":"https://api.github.com/repos/flutter/engine/statuses/050cab743dfdbf7706922eb7360f023d87e8003a"}}}}
{"actor":{"display_login":"chinmaygarde"}}