{"action":"created","comment":{"url":"https://api.github.com/repos/servo/webrender/pulls/comments/237670253","pull_request_review_id":180029460,"id":237670253,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNzY3MDI1Mw==","diff_hunk":"@@ -8,12 +8,50 @@ use euclid::{Point2D, Rect, Size2D, TypedPoint2D, TypedRect, TypedSize2D, Vector\n use euclid::{TypedTransform2D, TypedTransform3D, TypedVector2D, TypedScale};\n use num_traits::Zero;\n use plane_split::{Clipper, Polygon};\n-use std::{i32, f32, fmt};\n+use std::{i32, f32, fmt, ptr};\n use std::borrow::Cow;\n \n+\n // Matches the definition of SK_ScalarNearlyZero in Skia.\n const NEARLY_ZERO: f32 = 1.0 / 4096.0;\n \n+/// A typesafe helper that separates new value construction from\n+/// vector growing, which allows LLVM to elide the value copy.\n+#[must_use]\n+pub struct Allocation<'a, T: 'a> {\n+    vec: &'a mut Vec<T>,\n+    index: usize,\n+}\n+\n+impl<'a, T> Allocation<'a, T> {\n+    #[inline(always)]\n+    pub fn init(self, value: T) -> usize {","path":"webrender/src/util.rs","position":25,"original_position":22,"commit_id":"d680e32e44752bf8704eba1a66ddcbbc944a9ad1","original_commit_id":"83b830f90d17fe785591acf32e7cef5fd5d65ab1","user":{"login":"jrmuizel","id":332653,"node_id":"MDQ6VXNlcjMzMjY1Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/332653?v=4","gravatar_id":"","url":"https://api.github.com/users/jrmuizel","html_url":"https://github.com/jrmuizel","followers_url":"https://api.github.com/users/jrmuizel/followers","following_url":"https://api.github.com/users/jrmuizel/following{/other_user}","gists_url":"https://api.github.com/users/jrmuizel/gists{/gist_id}","starred_url":"https://api.github.com/users/jrmuizel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrmuizel/subscriptions","organizations_url":"https://api.github.com/users/jrmuizel/orgs","repos_url":"https://api.github.com/users/jrmuizel/repos","events_url":"https://api.github.com/users/jrmuizel/events{/privacy}","received_events_url":"https://api.github.com/users/jrmuizel/received_events","type":"User","site_admin":false},"body":"It looks like SmallVec also causes this to not work. I filed https://github.com/rust-lang/rust/issues/56356 about that.","created_at":"2018-11-29T21:44:19Z","updated_at":"2018-11-29T21:44:19Z","html_url":"https://github.com/servo/webrender/pull/3362#discussion_r237670253","pull_request_url":"https://api.github.com/repos/servo/webrender/pulls/3362","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/servo/webrender/pulls/comments/237670253"},"html":{"href":"https://github.com/servo/webrender/pull/3362#discussion_r237670253"},"pull_request":{"href":"https://api.github.com/repos/servo/webrender/pulls/3362"}},"in_reply_to_id":236840118},"pull_request":{"url":"https://api.github.com/repos/servo/webrender/pulls/3362","id":234053315,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0MDUzMzE1","html_url":"https://github.com/servo/webrender/pull/3362","diff_url":"https://github.com/servo/webrender/pull/3362.diff","patch_url":"https://github.com/servo/webrender/pull/3362.patch","issue_url":"https://api.github.com/repos/servo/webrender/issues/3362","number":3362,"state":"closed","locked":false,"title":"Avoid picture primitive copies via VecHelper","user":{"login":"kvark","id":107301,"node_id":"MDQ6VXNlcjEwNzMwMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/107301?v=4","gravatar_id":"","url":"https://api.github.com/users/kvark","html_url":"https://github.com/kvark","followers_url":"https://api.github.com/users/kvark/followers","following_url":"https://api.github.com/users/kvark/following{/other_user}","gists_url":"https://api.github.com/users/kvark/gists{/gist_id}","starred_url":"https://api.github.com/users/kvark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvark/subscriptions","organizations_url":"https://api.github.com/users/kvark/orgs","repos_url":"https://api.github.com/users/kvark/repos","events_url":"https://api.github.com/users/kvark/events{/privacy}","received_events_url":"https://api.github.com/users/kvark/received_events","type":"User","site_admin":false},"body":"This is a successor of #3360 that avoids the borrow checker dance via RAII \r\nAddresses part of #3358\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/servo/webrender/3362)\n<!-- Reviewable:end -->\n","created_at":"2018-11-27T20:41:58Z","updated_at":"2018-11-29T21:44:19Z","closed_at":"2018-11-28T16:45:46Z","merged_at":"2018-11-28T16:45:46Z","merge_commit_sha":"d680e32e44752bf8704eba1a66ddcbbc944a9ad1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/servo/webrender/pulls/3362/commits","review_comments_url":"https://api.github.com/repos/servo/webrender/pulls/3362/comments","review_comment_url":"https://api.github.com/repos/servo/webrender/pulls/comments{/number}","comments_url":"https://api.github.com/repos/servo/webrender/issues/3362/comments","statuses_url":"https://api.github.com/repos/servo/webrender/statuses/d680e32e44752bf8704eba1a66ddcbbc944a9ad1","head":{"label":"kvark:picture-copies2","ref":"picture-copies2","sha":"d680e32e44752bf8704eba1a66ddcbbc944a9ad1","user":{"login":"kvark","id":107301,"node_id":"MDQ6VXNlcjEwNzMwMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/107301?v=4","gravatar_id":"","url":"https://api.github.com/users/kvark","html_url":"https://github.com/kvark","followers_url":"https://api.github.com/users/kvark/followers","following_url":"https://api.github.com/users/kvark/following{/other_user}","gists_url":"https://api.github.com/users/kvark/gists{/gist_id}","starred_url":"https://api.github.com/users/kvark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvark/subscriptions","organizations_url":"https://api.github.com/users/kvark/orgs","repos_url":"https://api.github.com/users/kvark/repos","events_url":"https://api.github.com/users/kvark/events{/privacy}","received_events_url":"https://api.github.com/users/kvark/received_events","type":"User","site_admin":false},"repo":{"id":70811310,"node_id":"MDEwOlJlcG9zaXRvcnk3MDgxMTMxMA==","name":"webrender","full_name":"kvark/webrender","private":false,"owner":{"login":"kvark","id":107301,"node_id":"MDQ6VXNlcjEwNzMwMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/107301?v=4","gravatar_id":"","url":"https://api.github.com/users/kvark","html_url":"https://github.com/kvark","followers_url":"https://api.github.com/users/kvark/followers","following_url":"https://api.github.com/users/kvark/following{/other_user}","gists_url":"https://api.github.com/users/kvark/gists{/gist_id}","starred_url":"https://api.github.com/users/kvark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvark/subscriptions","organizations_url":"https://api.github.com/users/kvark/orgs","repos_url":"https://api.github.com/users/kvark/repos","events_url":"https://api.github.com/users/kvark/events{/privacy}","received_events_url":"https://api.github.com/users/kvark/received_events","type":"User","site_admin":false},"html_url":"https://github.com/kvark/webrender","description":"A very incomplete proof of concept GPU renderer for Servo","fork":true,"url":"https://api.github.com/repos/kvark/webrender","forks_url":"https://api.github.com/repos/kvark/webrender/forks","keys_url":"https://api.github.com/repos/kvark/webrender/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kvark/webrender/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kvark/webrender/teams","hooks_url":"https://api.github.com/repos/kvark/webrender/hooks","issue_events_url":"https://api.github.com/repos/kvark/webrender/issues/events{/number}","events_url":"https://api.github.com/repos/kvark/webrender/events","assignees_url":"https://api.github.com/repos/kvark/webrender/assignees{/user}","branches_url":"https://api.github.com/repos/kvark/webrender/branches{/branch}","tags_url":"https://api.github.com/repos/kvark/webrender/tags","blobs_url":"https://api.github.com/repos/kvark/webrender/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kvark/webrender/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kvark/webrender/git/refs{/sha}","trees_url":"https://api.github.com/repos/kvark/webrender/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kvark/webrender/statuses/{sha}","languages_url":"https://api.github.com/repos/kvark/webrender/languages","stargazers_url":"https://api.github.com/repos/kvark/webrender/stargazers","contributors_url":"https://api.github.com/repos/kvark/webrender/contributors","subscribers_url":"https://api.github.com/repos/kvark/webrender/subscribers","subscription_url":"https://api.github.com/repos/kvark/webrender/subscription","commits_url":"https://api.github.com/repos/kvark/webrender/commits{/sha}","git_commits_url":"https://api.github.com/repos/kvark/webrender/git/commits{/sha}","comments_url":"https://api.github.com/repos/kvark/webrender/comments{/number}","issue_comment_url":"https://api.github.com/repos/kvark/webrender/issues/comments{/number}","contents_url":"https://api.github.com/repos/kvark/webrender/contents/{+path}","compare_url":"https://api.github.com/repos/kvark/webrender/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kvark/webrender/merges","archive_url":"https://api.github.com/repos/kvark/webrender/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kvark/webrender/downloads","issues_url":"https://api.github.com/repos/kvark/webrender/issues{/number}","pulls_url":"https://api.github.com/repos/kvark/webrender/pulls{/number}","milestones_url":"https://api.github.com/repos/kvark/webrender/milestones{/number}","notifications_url":"https://api.github.com/repos/kvark/webrender/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kvark/webrender/labels{/name}","releases_url":"https://api.github.com/repos/kvark/webrender/releases{/id}","deployments_url":"https://api.github.com/repos/kvark/webrender/deployments","created_at":"2016-10-13T13:50:07Z","updated_at":"2018-07-19T13:37:36Z","pushed_at":"2018-11-29T20:47:27Z","git_url":"git://github.com/kvark/webrender.git","ssh_url":"git@github.com:kvark/webrender.git","clone_url":"https://github.com/kvark/webrender.git","svn_url":"https://github.com/kvark/webrender","homepage":"https://doc.servo.org/webrender/","size":44067,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"servo:master","ref":"master","sha":"3d73e3885907ae3d48b46fba891073abdb59e76d","user":{"login":"servo","id":2566135,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NjYxMzU=","avatar_url":"https://avatars1.githubusercontent.com/u/2566135?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnk0Mjg5NDU3NQ==","name":"webrender","full_name":"servo/webrender","private":false,"owner":{"login":"servo","id":2566135,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NjYxMzU=","avatar_url":"https://avatars1.githubusercontent.com/u/2566135?v=4","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},"html_url":"https://github.com/servo/webrender","description":"A GPU-based renderer for the web","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":"2018-11-29T20:39:17Z","pushed_at":"2018-11-29T21:06:51Z","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":39641,"stargazers_count":1375,"watchers_count":1375,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":190,"mirror_url":null,"archived":false,"open_issues_count":236,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":190,"open_issues":236,"watchers":1375,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/servo/webrender/pulls/3362"},"html":{"href":"https://github.com/servo/webrender/pull/3362"},"issue":{"href":"https://api.github.com/repos/servo/webrender/issues/3362"},"comments":{"href":"https://api.github.com/repos/servo/webrender/issues/3362/comments"},"review_comments":{"href":"https://api.github.com/repos/servo/webrender/pulls/3362/comments"},"review_comment":{"href":"https://api.github.com/repos/servo/webrender/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/servo/webrender/pulls/3362/commits"},"statuses":{"href":"https://api.github.com/repos/servo/webrender/statuses/d680e32e44752bf8704eba1a66ddcbbc944a9ad1"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"jrmuizel"}}