{"action":"created","comment":{"url":"https://api.github.com/repos/servo/webrender/pulls/comments/86892332","pull_request_review_id":7527609,"id":86892332,"diff_hunk":"@@ -47,6 +49,31 @@ struct GlyphMetrics {\n     rasterized_height: u32,\n }\n \n+// According to the Skia source code, there's no public API to\n+// determine if subpixel AA is supported. So jrmuizel ported\n+// this function from Skia which is used to check if a glyph\n+// can be rendered with subpixel AA.\n+fn supports_subpixel_aa() -> bool {\n+    let mut cg_context = CGContext::create_bitmap_context(1, 1, 8, 4,\n+                                                          &CGColorSpace::create_device_rgb(),\n+                                                          kCGImageAlphaNoneSkipFirst |\n+                                                          kCGBitmapByteOrder32Little);\n+    let ct_font = core_text::font::new_from_name(\"Helvetica\", 16.).unwrap();\n+    cg_context.set_should_smooth_fonts(true);\n+    cg_context.set_should_antialias(true);\n+    cg_context.set_allows_font_smoothing(true);\n+    cg_context.set_rgb_fill_color(1.0, 1.0, 1.0, 1.0);\n+    let point = CGPoint {x: -1., y: 0.};\n+    let glyph = '|' as CGGlyph;\n+    ct_font.draw_glyphs(&[glyph], &[point], cg_context.clone());\n+    let data = cg_context.data();\n+    let rgb : u32 = unsafe { mem::transmute::<[u8; 4], u32>([data[0],data[1],data[2],data[3]]) };\n+    let r = (rgb >> 16) & 0xFF;\n+    let g = (rgb >>  8) & 0xFF;\n+    let b = (rgb >>  0) & 0xFF;\n+    r != g || r != b","path":"webrender/src/platform/macos/font.rs","position":44,"original_position":44,"commit_id":"7932cf3fb90ebc52978ea6b3b1fa79e2f492a7f0","original_commit_id":"7932cf3fb90ebc52978ea6b3b1fa79e2f492a7f0","user":{"login":"pcwalton","id":157897,"avatar_url":"https://avatars.githubusercontent.com/u/157897?v=3","gravatar_id":"","url":"https://api.github.com/users/pcwalton","html_url":"https://github.com/pcwalton","followers_url":"https://api.github.com/users/pcwalton/followers","following_url":"https://api.github.com/users/pcwalton/following{/other_user}","gists_url":"https://api.github.com/users/pcwalton/gists{/gist_id}","starred_url":"https://api.github.com/users/pcwalton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcwalton/subscriptions","organizations_url":"https://api.github.com/users/pcwalton/orgs","repos_url":"https://api.github.com/users/pcwalton/repos","events_url":"https://api.github.com/users/pcwalton/events{/privacy}","received_events_url":"https://api.github.com/users/pcwalton/received_events","type":"User","site_admin":false},"body":"Why is the u32 conversion needed if you just extract bytes again?","created_at":"2016-11-07T23:18:33Z","updated_at":"2016-11-07T23:20:55Z","html_url":"https://github.com/servo/webrender/pull/537#discussion_r86892332","pull_request_url":"https://api.github.com/repos/servo/webrender/pulls/537","_links":{"self":{"href":"https://api.github.com/repos/servo/webrender/pulls/comments/86892332"},"html":{"href":"https://github.com/servo/webrender/pull/537#discussion_r86892332"},"pull_request":{"href":"https://api.github.com/repos/servo/webrender/pulls/537"}}},"pull_request":{"url":"https://api.github.com/repos/servo/webrender/pulls/537","id":92684869,"html_url":"https://github.com/servo/webrender/pull/537","diff_url":"https://github.com/servo/webrender/pull/537.diff","patch_url":"https://github.com/servo/webrender/pull/537.patch","issue_url":"https://api.github.com/repos/servo/webrender/issues/537","number":537,"state":"open","locked":false,"title":"Support subpixel render mode for mac font platform.","user":{"login":"glennw","id":2350882,"avatar_url":"https://avatars.githubusercontent.com/u/2350882?v=3","gravatar_id":"","url":"https://api.github.com/users/glennw","html_url":"https://github.com/glennw","followers_url":"https://api.github.com/users/glennw/followers","following_url":"https://api.github.com/users/glennw/following{/other_user}","gists_url":"https://api.github.com/users/glennw/gists{/gist_id}","starred_url":"https://api.github.com/users/glennw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glennw/subscriptions","organizations_url":"https://api.github.com/users/glennw/orgs","repos_url":"https://api.github.com/users/glennw/repos","events_url":"https://api.github.com/users/glennw/events{/privacy}","received_events_url":"https://api.github.com/users/glennw/received_events","type":"User","site_admin":false},"body":"\n\n<!-- Reviewable:start -->\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/servo/webrender/537)\n<!-- Reviewable:end -->\n","created_at":"2016-11-07T23:17:07Z","updated_at":"2016-11-07T23:20:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e5eb48532afa128339c0a7623801db9168caa2d8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/servo/webrender/pulls/537/commits","review_comments_url":"https://api.github.com/repos/servo/webrender/pulls/537/comments","review_comment_url":"https://api.github.com/repos/servo/webrender/pulls/comments{/number}","comments_url":"https://api.github.com/repos/servo/webrender/issues/537/comments","statuses_url":"https://api.github.com/repos/servo/webrender/statuses/7932cf3fb90ebc52978ea6b3b1fa79e2f492a7f0","head":{"label":"glennw:mac-subpixel","ref":"mac-subpixel","sha":"7932cf3fb90ebc52978ea6b3b1fa79e2f492a7f0","user":{"login":"glennw","id":2350882,"avatar_url":"https://avatars.githubusercontent.com/u/2350882?v=3","gravatar_id":"","url":"https://api.github.com/users/glennw","html_url":"https://github.com/glennw","followers_url":"https://api.github.com/users/glennw/followers","following_url":"https://api.github.com/users/glennw/following{/other_user}","gists_url":"https://api.github.com/users/glennw/gists{/gist_id}","starred_url":"https://api.github.com/users/glennw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glennw/subscriptions","organizations_url":"https://api.github.com/users/glennw/orgs","repos_url":"https://api.github.com/users/glennw/repos","events_url":"https://api.github.com/users/glennw/events{/privacy}","received_events_url":"https://api.github.com/users/glennw/received_events","type":"User","site_admin":false},"repo":{"id":52637545,"name":"webrender","full_name":"glennw/webrender","owner":{"login":"glennw","id":2350882,"avatar_url":"https://avatars.githubusercontent.com/u/2350882?v=3","gravatar_id":"","url":"https://api.github.com/users/glennw","html_url":"https://github.com/glennw","followers_url":"https://api.github.com/users/glennw/followers","following_url":"https://api.github.com/users/glennw/following{/other_user}","gists_url":"https://api.github.com/users/glennw/gists{/gist_id}","starred_url":"https://api.github.com/users/glennw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glennw/subscriptions","organizations_url":"https://api.github.com/users/glennw/orgs","repos_url":"https://api.github.com/users/glennw/repos","events_url":"https://api.github.com/users/glennw/events{/privacy}","received_events_url":"https://api.github.com/users/glennw/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/glennw/webrender","description":"A very incomplete proof of concept GPU renderer for Servo","fork":true,"url":"https://api.github.com/repos/glennw/webrender","forks_url":"https://api.github.com/repos/glennw/webrender/forks","keys_url":"https://api.github.com/repos/glennw/webrender/keys{/key_id}","collaborators_url":"https://api.github.com/repos/glennw/webrender/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/glennw/webrender/teams","hooks_url":"https://api.github.com/repos/glennw/webrender/hooks","issue_events_url":"https://api.github.com/repos/glennw/webrender/issues/events{/number}","events_url":"https://api.github.com/repos/glennw/webrender/events","assignees_url":"https://api.github.com/repos/glennw/webrender/assignees{/user}","branches_url":"https://api.github.com/repos/glennw/webrender/branches{/branch}","tags_url":"https://api.github.com/repos/glennw/webrender/tags","blobs_url":"https://api.github.com/repos/glennw/webrender/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/glennw/webrender/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/glennw/webrender/git/refs{/sha}","trees_url":"https://api.github.com/repos/glennw/webrender/git/trees{/sha}","statuses_url":"https://api.github.com/repos/glennw/webrender/statuses/{sha}","languages_url":"https://api.github.com/repos/glennw/webrender/languages","stargazers_url":"https://api.github.com/repos/glennw/webrender/stargazers","contributors_url":"https://api.github.com/repos/glennw/webrender/contributors","subscribers_url":"https://api.github.com/repos/glennw/webrender/subscribers","subscription_url":"https://api.github.com/repos/glennw/webrender/subscription","commits_url":"https://api.github.com/repos/glennw/webrender/commits{/sha}","git_commits_url":"https://api.github.com/repos/glennw/webrender/git/commits{/sha}","comments_url":"https://api.github.com/repos/glennw/webrender/comments{/number}","issue_comment_url":"https://api.github.com/repos/glennw/webrender/issues/comments{/number}","contents_url":"https://api.github.com/repos/glennw/webrender/contents/{+path}","compare_url":"https://api.github.com/repos/glennw/webrender/compare/{base}...{head}","merges_url":"https://api.github.com/repos/glennw/webrender/merges","archive_url":"https://api.github.com/repos/glennw/webrender/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/glennw/webrender/downloads","issues_url":"https://api.github.com/repos/glennw/webrender/issues{/number}","pulls_url":"https://api.github.com/repos/glennw/webrender/pulls{/number}","milestones_url":"https://api.github.com/repos/glennw/webrender/milestones{/number}","notifications_url":"https://api.github.com/repos/glennw/webrender/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/glennw/webrender/labels{/name}","releases_url":"https://api.github.com/repos/glennw/webrender/releases{/id}","deployments_url":"https://api.github.com/repos/glennw/webrender/deployments","created_at":"2016-02-26T22:42:32Z","updated_at":"2016-11-03T15:30:49Z","pushed_at":"2016-11-07T23:15:06Z","git_url":"git://github.com/glennw/webrender.git","ssh_url":"git@github.com:glennw/webrender.git","clone_url":"https://github.com/glennw/webrender.git","svn_url":"https://github.com/glennw/webrender","homepage":null,"size":3594,"stargazers_count":3,"watchers_count":3,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":0,"forks":3,"open_issues":0,"watchers":3,"default_branch":"master"}},"base":{"label":"servo:master","ref":"master","sha":"45727434fd8d8e8398a1a62550f294d15e04290a","user":{"login":"servo","id":2566135,"avatar_url":"https://avatars.githubusercontent.com/u/2566135?v=3","gravatar_id":"","url":"https://api.github.com/users/servo","html_url":"https://github.com/servo","followers_url":"https://api.github.com/users/servo/followers","following_url":"https://api.github.com/users/servo/following{/other_user}","gists_url":"https://api.github.com/users/servo/gists{/gist_id}","starred_url":"https://api.github.com/users/servo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servo/subscriptions","organizations_url":"https://api.github.com/users/servo/orgs","repos_url":"https://api.github.com/users/servo/repos","events_url":"https://api.github.com/users/servo/events{/privacy}","received_events_url":"https://api.github.com/users/servo/received_events","type":"Organization","site_admin":false},"repo":{"id":42894575,"name":"webrender","full_name":"servo/webrender","owner":{"login":"servo","id":2566135,"avatar_url":"https://avatars.githubusercontent.com/u/2566135?v=3","gravatar_id":"","url":"https://api.github.com/users/servo","html_url":"https://github.com/servo","followers_url":"https://api.github.com/users/servo/followers","following_url":"https://api.github.com/users/servo/following{/other_user}","gists_url":"https://api.github.com/users/servo/gists{/gist_id}","starred_url":"https://api.github.com/users/servo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servo/subscriptions","organizations_url":"https://api.github.com/users/servo/orgs","repos_url":"https://api.github.com/users/servo/repos","events_url":"https://api.github.com/users/servo/events{/privacy}","received_events_url":"https://api.github.com/users/servo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/servo/webrender","description":"A very incomplete proof of concept GPU renderer for Servo","fork":false,"url":"https://api.github.com/repos/servo/webrender","forks_url":"https://api.github.com/repos/servo/webrender/forks","keys_url":"https://api.github.com/repos/servo/webrender/keys{/key_id}","collaborators_url":"https://api.github.com/repos/servo/webrender/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/servo/webrender/teams","hooks_url":"https://api.github.com/repos/servo/webrender/hooks","issue_events_url":"https://api.github.com/repos/servo/webrender/issues/events{/number}","events_url":"https://api.github.com/repos/servo/webrender/events","assignees_url":"https://api.github.com/repos/servo/webrender/assignees{/user}","branches_url":"https://api.github.com/repos/servo/webrender/branches{/branch}","tags_url":"https://api.github.com/repos/servo/webrender/tags","blobs_url":"https://api.github.com/repos/servo/webrender/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/servo/webrender/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/servo/webrender/git/refs{/sha}","trees_url":"https://api.github.com/repos/servo/webrender/git/trees{/sha}","statuses_url":"https://api.github.com/repos/servo/webrender/statuses/{sha}","languages_url":"https://api.github.com/repos/servo/webrender/languages","stargazers_url":"https://api.github.com/repos/servo/webrender/stargazers","contributors_url":"https://api.github.com/repos/servo/webrender/contributors","subscribers_url":"https://api.github.com/repos/servo/webrender/subscribers","subscription_url":"https://api.github.com/repos/servo/webrender/subscription","commits_url":"https://api.github.com/repos/servo/webrender/commits{/sha}","git_commits_url":"https://api.github.com/repos/servo/webrender/git/commits{/sha}","comments_url":"https://api.github.com/repos/servo/webrender/comments{/number}","issue_comment_url":"https://api.github.com/repos/servo/webrender/issues/comments{/number}","contents_url":"https://api.github.com/repos/servo/webrender/contents/{+path}","compare_url":"https://api.github.com/repos/servo/webrender/compare/{base}...{head}","merges_url":"https://api.github.com/repos/servo/webrender/merges","archive_url":"https://api.github.com/repos/servo/webrender/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/servo/webrender/downloads","issues_url":"https://api.github.com/repos/servo/webrender/issues{/number}","pulls_url":"https://api.github.com/repos/servo/webrender/pulls{/number}","milestones_url":"https://api.github.com/repos/servo/webrender/milestones{/number}","notifications_url":"https://api.github.com/repos/servo/webrender/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/servo/webrender/labels{/name}","releases_url":"https://api.github.com/repos/servo/webrender/releases{/id}","deployments_url":"https://api.github.com/repos/servo/webrender/deployments","created_at":"2015-09-21T21:27:30Z","updated_at":"2016-11-07T12:47:40Z","pushed_at":"2016-11-07T23:17:12Z","git_url":"git://github.com/servo/webrender.git","ssh_url":"git@github.com:servo/webrender.git","clone_url":"https://github.com/servo/webrender.git","svn_url":"https://github.com/servo/webrender","homepage":"https://doc.servo.org/webrender/","size":3402,"stargazers_count":509,"watchers_count":509,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":63,"mirror_url":null,"open_issues_count":62,"forks":63,"open_issues":62,"watchers":509,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/servo/webrender/pulls/537"},"html":{"href":"https://github.com/servo/webrender/pull/537"},"issue":{"href":"https://api.github.com/repos/servo/webrender/issues/537"},"comments":{"href":"https://api.github.com/repos/servo/webrender/issues/537/comments"},"review_comments":{"href":"https://api.github.com/repos/servo/webrender/pulls/537/comments"},"review_comment":{"href":"https://api.github.com/repos/servo/webrender/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/servo/webrender/pulls/537/commits"},"statuses":{"href":"https://api.github.com/repos/servo/webrender/statuses/7932cf3fb90ebc52978ea6b3b1fa79e2f492a7f0"}}}}
{"actor":{"display_login":"pcwalton"}}