{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/WinObjC/pulls/comments/82040040","pull_request_review_id":2975259,"id":82040040,"diff_hunk":"@@ -0,0 +1,33 @@\n+//******************************************************************************\n+//\n+// Copyright (c) Microsoft. All rights reserved.\n+//\n+// This code is licensed under the MIT License (MIT).\n+//\n+// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n+// THE SOFTWARE.\n+//\n+//******************************************************************************\n+\n+#import <CoreGraphics/D2DWrapper.h>\n+#import <Starboard.h>\n+\n+static const wchar_t* TAG = L\"_D2DWrapper\";\n+\n+// Helper for creating a D2DFactory\n+static ComPtr<ID2D1Factory> _CreateD2DFactoryInstance(D2D1_FACTORY_TYPE type) {\n+    ComPtr<ID2D1Factory> d2dFactory;\n+    THROW_IF_FAILED(D2D1CreateFactory(type, d2dFactory.ReleaseAndGetAddressOf()));\n+    return d2dFactory;\n+}\n+\n+// Helper for accessing a single static multithreaded D2DFactory instance\n+static ComPtr<ID2D1Factory> _GetD2DFactoryInstance() {\n+    static ComPtr<ID2D1Factory> s_d2dFactory = _CreateD2DFactoryInstance(D2D1_FACTORY_TYPE_MULTI_THREADED);","path":"Frameworks/CoreGraphics/D2DWrapper.mm","position":31,"original_position":31,"commit_id":"a636741c75ff94bf3f6d3e3c708291a423e4189b","original_commit_id":"a636741c75ff94bf3f6d3e3c708291a423e4189b","user":{"login":"MSFTFox","id":17168010,"avatar_url":"https://avatars.githubusercontent.com/u/17168010?v=3","gravatar_id":"","url":"https://api.github.com/users/MSFTFox","html_url":"https://github.com/MSFTFox","followers_url":"https://api.github.com/users/MSFTFox/followers","following_url":"https://api.github.com/users/MSFTFox/following{/other_user}","gists_url":"https://api.github.com/users/MSFTFox/gists{/gist_id}","starred_url":"https://api.github.com/users/MSFTFox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MSFTFox/subscriptions","organizations_url":"https://api.github.com/users/MSFTFox/orgs","repos_url":"https://api.github.com/users/MSFTFox/repos","events_url":"https://api.github.com/users/MSFTFox/events{/privacy}","received_events_url":"https://api.github.com/users/MSFTFox/received_events","type":"User","site_admin":false},"body":"Based on the reading it seems like a singlethreaded factory really isn't needed.\r\n\r\n---\r\nIn reply to: [82024085](https://github.com/Microsoft/WinObjC/pull/1085#discussion_r82024085) [](ancestors = 82024085,82023742,82000836)","created_at":"2016-10-05T18:33:28Z","updated_at":"2016-10-05T18:33:28Z","html_url":"https://github.com/Microsoft/WinObjC/pull/1085#discussion_r82040040","pull_request_url":"https://api.github.com/repos/Microsoft/WinObjC/pulls/1085","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/WinObjC/pulls/comments/82040040"},"html":{"href":"https://github.com/Microsoft/WinObjC/pull/1085#discussion_r82040040"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/WinObjC/pulls/1085"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/WinObjC/pulls/1085","id":88001439,"html_url":"https://github.com/Microsoft/WinObjC/pull/1085","diff_url":"https://github.com/Microsoft/WinObjC/pull/1085.diff","patch_url":"https://github.com/Microsoft/WinObjC/pull/1085.patch","issue_url":"https://api.github.com/repos/Microsoft/WinObjC/issues/1085","number":1085,"state":"open","locked":false,"title":"D2DFactory Wrapper","user":{"login":"MSFTFox","id":17168010,"avatar_url":"https://avatars.githubusercontent.com/u/17168010?v=3","gravatar_id":"","url":"https://api.github.com/users/MSFTFox","html_url":"https://github.com/MSFTFox","followers_url":"https://api.github.com/users/MSFTFox/followers","following_url":"https://api.github.com/users/MSFTFox/following{/other_user}","gists_url":"https://api.github.com/users/MSFTFox/gists{/gist_id}","starred_url":"https://api.github.com/users/MSFTFox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MSFTFox/subscriptions","organizations_url":"https://api.github.com/users/MSFTFox/orgs","repos_url":"https://api.github.com/users/MSFTFox/repos","events_url":"https://api.github.com/users/MSFTFox/events{/privacy}","received_events_url":"https://api.github.com/users/MSFTFox/received_events","type":"User","site_admin":false},"body":"This is to provide a static helper function for creating factories to create the D2D objects that CG will be using very frequently.","created_at":"2016-10-05T01:05:57Z","updated_at":"2016-10-05T18:33:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d679f87600468dce2ef7f2a0f0f527bb49d25380","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/WinObjC/pulls/1085/commits","review_comments_url":"https://api.github.com/repos/Microsoft/WinObjC/pulls/1085/comments","review_comment_url":"https://api.github.com/repos/Microsoft/WinObjC/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/WinObjC/issues/1085/comments","statuses_url":"https://api.github.com/repos/Microsoft/WinObjC/statuses/a636741c75ff94bf3f6d3e3c708291a423e4189b","head":{"label":"MSFTFox:henryfox/CGD2DWrapper","ref":"henryfox/CGD2DWrapper","sha":"a636741c75ff94bf3f6d3e3c708291a423e4189b","user":{"login":"MSFTFox","id":17168010,"avatar_url":"https://avatars.githubusercontent.com/u/17168010?v=3","gravatar_id":"","url":"https://api.github.com/users/MSFTFox","html_url":"https://github.com/MSFTFox","followers_url":"https://api.github.com/users/MSFTFox/followers","following_url":"https://api.github.com/users/MSFTFox/following{/other_user}","gists_url":"https://api.github.com/users/MSFTFox/gists{/gist_id}","starred_url":"https://api.github.com/users/MSFTFox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MSFTFox/subscriptions","organizations_url":"https://api.github.com/users/MSFTFox/orgs","repos_url":"https://api.github.com/users/MSFTFox/repos","events_url":"https://api.github.com/users/MSFTFox/events{/privacy}","received_events_url":"https://api.github.com/users/MSFTFox/received_events","type":"User","site_admin":false},"repo":{"id":63458119,"name":"WinObjC","full_name":"MSFTFox/WinObjC","owner":{"login":"MSFTFox","id":17168010,"avatar_url":"https://avatars.githubusercontent.com/u/17168010?v=3","gravatar_id":"","url":"https://api.github.com/users/MSFTFox","html_url":"https://github.com/MSFTFox","followers_url":"https://api.github.com/users/MSFTFox/followers","following_url":"https://api.github.com/users/MSFTFox/following{/other_user}","gists_url":"https://api.github.com/users/MSFTFox/gists{/gist_id}","starred_url":"https://api.github.com/users/MSFTFox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MSFTFox/subscriptions","organizations_url":"https://api.github.com/users/MSFTFox/orgs","repos_url":"https://api.github.com/users/MSFTFox/repos","events_url":"https://api.github.com/users/MSFTFox/events{/privacy}","received_events_url":"https://api.github.com/users/MSFTFox/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MSFTFox/WinObjC","description":"Objective-C for Windows","fork":true,"url":"https://api.github.com/repos/MSFTFox/WinObjC","forks_url":"https://api.github.com/repos/MSFTFox/WinObjC/forks","keys_url":"https://api.github.com/repos/MSFTFox/WinObjC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MSFTFox/WinObjC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MSFTFox/WinObjC/teams","hooks_url":"https://api.github.com/repos/MSFTFox/WinObjC/hooks","issue_events_url":"https://api.github.com/repos/MSFTFox/WinObjC/issues/events{/number}","events_url":"https://api.github.com/repos/MSFTFox/WinObjC/events","assignees_url":"https://api.github.com/repos/MSFTFox/WinObjC/assignees{/user}","branches_url":"https://api.github.com/repos/MSFTFox/WinObjC/branches{/branch}","tags_url":"https://api.github.com/repos/MSFTFox/WinObjC/tags","blobs_url":"https://api.github.com/repos/MSFTFox/WinObjC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MSFTFox/WinObjC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MSFTFox/WinObjC/git/refs{/sha}","trees_url":"https://api.github.com/repos/MSFTFox/WinObjC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MSFTFox/WinObjC/statuses/{sha}","languages_url":"https://api.github.com/repos/MSFTFox/WinObjC/languages","stargazers_url":"https://api.github.com/repos/MSFTFox/WinObjC/stargazers","contributors_url":"https://api.github.com/repos/MSFTFox/WinObjC/contributors","subscribers_url":"https://api.github.com/repos/MSFTFox/WinObjC/subscribers","subscription_url":"https://api.github.com/repos/MSFTFox/WinObjC/subscription","commits_url":"https://api.github.com/repos/MSFTFox/WinObjC/commits{/sha}","git_commits_url":"https://api.github.com/repos/MSFTFox/WinObjC/git/commits{/sha}","comments_url":"https://api.github.com/repos/MSFTFox/WinObjC/comments{/number}","issue_comment_url":"https://api.github.com/repos/MSFTFox/WinObjC/issues/comments{/number}","contents_url":"https://api.github.com/repos/MSFTFox/WinObjC/contents/{+path}","compare_url":"https://api.github.com/repos/MSFTFox/WinObjC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MSFTFox/WinObjC/merges","archive_url":"https://api.github.com/repos/MSFTFox/WinObjC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MSFTFox/WinObjC/downloads","issues_url":"https://api.github.com/repos/MSFTFox/WinObjC/issues{/number}","pulls_url":"https://api.github.com/repos/MSFTFox/WinObjC/pulls{/number}","milestones_url":"https://api.github.com/repos/MSFTFox/WinObjC/milestones{/number}","notifications_url":"https://api.github.com/repos/MSFTFox/WinObjC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MSFTFox/WinObjC/labels{/name}","releases_url":"https://api.github.com/repos/MSFTFox/WinObjC/releases{/id}","deployments_url":"https://api.github.com/repos/MSFTFox/WinObjC/deployments","created_at":"2016-07-16T00:32:00Z","updated_at":"2016-07-16T00:32:15Z","pushed_at":"2016-10-05T01:31:12Z","git_url":"git://github.com/MSFTFox/WinObjC.git","ssh_url":"git@github.com:MSFTFox/WinObjC.git","clone_url":"https://github.com/MSFTFox/WinObjC.git","svn_url":"https://github.com/MSFTFox/WinObjC","homepage":"","size":330242,"stargazers_count":0,"watchers_count":0,"language":"Objective-C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"Microsoft:CGD2D","ref":"CGD2D","sha":"190f5898649728870ecf1e1603aed53ff0499364","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":37950166,"name":"WinObjC","full_name":"Microsoft/WinObjC","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/WinObjC","description":"Objective-C for Windows","fork":false,"url":"https://api.github.com/repos/Microsoft/WinObjC","forks_url":"https://api.github.com/repos/Microsoft/WinObjC/forks","keys_url":"https://api.github.com/repos/Microsoft/WinObjC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/WinObjC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/WinObjC/teams","hooks_url":"https://api.github.com/repos/Microsoft/WinObjC/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/WinObjC/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/WinObjC/events","assignees_url":"https://api.github.com/repos/Microsoft/WinObjC/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/WinObjC/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/WinObjC/tags","blobs_url":"https://api.github.com/repos/Microsoft/WinObjC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/WinObjC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/WinObjC/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/WinObjC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/WinObjC/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/WinObjC/languages","stargazers_url":"https://api.github.com/repos/Microsoft/WinObjC/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/WinObjC/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/WinObjC/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/WinObjC/subscription","commits_url":"https://api.github.com/repos/Microsoft/WinObjC/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/WinObjC/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/WinObjC/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/WinObjC/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/WinObjC/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/WinObjC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/WinObjC/merges","archive_url":"https://api.github.com/repos/Microsoft/WinObjC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/WinObjC/downloads","issues_url":"https://api.github.com/repos/Microsoft/WinObjC/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/WinObjC/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/WinObjC/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/WinObjC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/WinObjC/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/WinObjC/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/WinObjC/deployments","created_at":"2015-06-23T23:14:58Z","updated_at":"2016-10-05T03:58:40Z","pushed_at":"2016-10-05T17:59:51Z","git_url":"git://github.com/Microsoft/WinObjC.git","ssh_url":"git@github.com:Microsoft/WinObjC.git","clone_url":"https://github.com/Microsoft/WinObjC.git","svn_url":"https://github.com/Microsoft/WinObjC","homepage":"","size":335079,"stargazers_count":5465,"watchers_count":5465,"language":"Objective-C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":703,"mirror_url":null,"open_issues_count":222,"forks":703,"open_issues":222,"watchers":5465,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/WinObjC/pulls/1085"},"html":{"href":"https://github.com/Microsoft/WinObjC/pull/1085"},"issue":{"href":"https://api.github.com/repos/Microsoft/WinObjC/issues/1085"},"comments":{"href":"https://api.github.com/repos/Microsoft/WinObjC/issues/1085/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/WinObjC/pulls/1085/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/WinObjC/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/WinObjC/pulls/1085/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/WinObjC/statuses/a636741c75ff94bf3f6d3e3c708291a423e4189b"}}}}
{"actor":{"display_login":"MSFTFox"}}