{"action":"created","comment":{"url":"https://api.github.com/repos/servo/servo/pulls/comments/22424544","id":22424544,"diff_hunk":"@@ -456,6 +467,41 @@ impl<Window: WindowMethods> IOCompositor<Window> {\n         self.composite_if_necessary();\n     }\n \n+    fn create_root_layer_for_pipeline_and_rect(&mut self,\n+                                               pipeline: &CompositionPipeline,\n+                                               frame_rect: Option<TypedRect<PagePx, f32>>)\n+                                               -> Rc<Layer<CompositorData>> {\n+        let layer_properties = LayerProperties {\n+            pipeline_id: pipeline.id,\n+            epoch: Epoch(0),\n+            id: LayerId::null(),\n+            rect: Rect::zero(),\n+            background_color: azure_hl::Color::new(0., 0., 0., 0.),\n+            scroll_policy: Scrollable,\n+        };\n+\n+        let root_layer = CompositorData::new_layer(pipeline.clone(),\n+                                                   layer_properties,\n+                                                   WantsScrollEventsFlag::WantsScrollEvents,\n+                                                   opts::get().tile_size);\n+        if !self.paint_channels.contains_key(&pipeline.id) {\n+            self.paint_channels.insert(pipeline.id, pipeline.paint_chan.clone());\n+        }\n+\n+        // All root layers mask to bounds.\n+        *root_layer.masks_to_bounds.borrow_mut() = true;\n+\n+        match frame_rect {","path":"components/compositing/compositor.rs","position":60,"original_position":60,"commit_id":"797decbbc47e2f342002133be6ed0b9cf55b623c","original_commit_id":"797decbbc47e2f342002133be6ed0b9cf55b623c","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":"nit: could be `if let Some(ref frame_rect) = ...`","created_at":"2015-01-02T22:05:24Z","updated_at":"2015-01-02T22:05:24Z","html_url":"https://github.com/servo/servo/pull/4536#discussion_r22424544","pull_request_url":"https://api.github.com/repos/servo/servo/pulls/4536","_links":{"self":{"href":"https://api.github.com/repos/servo/servo/pulls/comments/22424544"},"html":{"href":"https://github.com/servo/servo/pull/4536#discussion_r22424544"},"pull_request":{"href":"https://api.github.com/repos/servo/servo/pulls/4536"}}},"pull_request":{"url":"https://api.github.com/repos/servo/servo/pulls/4536","id":26764437,"html_url":"https://github.com/servo/servo/pull/4536","diff_url":"https://github.com/servo/servo/pull/4536.diff","patch_url":"https://github.com/servo/servo/pull/4536.patch","issue_url":"https://api.github.com/repos/servo/servo/issues/4536","number":4536,"state":"open","locked":false,"title":"Stall PaintTask exit until it can release all buffers","user":{"login":"mrobinson","id":13536,"avatar_url":"https://avatars.githubusercontent.com/u/13536?v=3","gravatar_id":"","url":"https://api.github.com/users/mrobinson","html_url":"https://github.com/mrobinson","followers_url":"https://api.github.com/users/mrobinson/followers","following_url":"https://api.github.com/users/mrobinson/following{/other_user}","gists_url":"https://api.github.com/users/mrobinson/gists{/gist_id}","starred_url":"https://api.github.com/users/mrobinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrobinson/subscriptions","organizations_url":"https://api.github.com/users/mrobinson/orgs","repos_url":"https://api.github.com/users/mrobinson/repos","events_url":"https://api.github.com/users/mrobinson/events{/privacy}","received_events_url":"https://api.github.com/users/mrobinson/received_events","type":"User","site_admin":false},"body":"It is possible for a PaintTask to start exiting soon after sending new\r\nbuffers to the compositor. In that case, the compositor should return\r\nthe now unnecessary buffers to the PaintTask so that it can properly\r\nfree them.\r\n\r\nTo accomplish this, the compositor now keeps a hash map of paint task\r\nchannels per pipeline id. When a PaintTask exists, the constellation\r\ninforms the compositor that it can forget about it. Additionally, the\r\nPaintTask should not wait for any buffers when the engine is doing a\r\ncomplete shutdown. In that case, the compositor is already halted and\r\nhas simply let all buffers leak. We pipe through the shutdown type when\r\ndestroying the pipeline to make this decision.\r\n\r\nFixes #2641.","created_at":"2015-01-02T17:45:37Z","updated_at":"2015-01-02T22:05:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"70083f72089de717457edbaabe7c6724f37af330","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/servo/servo/pulls/4536/commits","review_comments_url":"https://api.github.com/repos/servo/servo/pulls/4536/comments","review_comment_url":"https://api.github.com/repos/servo/servo/pulls/comments/{number}","comments_url":"https://api.github.com/repos/servo/servo/issues/4536/comments","statuses_url":"https://api.github.com/repos/servo/servo/statuses/797decbbc47e2f342002133be6ed0b9cf55b623c","head":{"label":"mrobinson:pixmap","ref":"pixmap","sha":"797decbbc47e2f342002133be6ed0b9cf55b623c","user":{"login":"mrobinson","id":13536,"avatar_url":"https://avatars.githubusercontent.com/u/13536?v=3","gravatar_id":"","url":"https://api.github.com/users/mrobinson","html_url":"https://github.com/mrobinson","followers_url":"https://api.github.com/users/mrobinson/followers","following_url":"https://api.github.com/users/mrobinson/following{/other_user}","gists_url":"https://api.github.com/users/mrobinson/gists{/gist_id}","starred_url":"https://api.github.com/users/mrobinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrobinson/subscriptions","organizations_url":"https://api.github.com/users/mrobinson/orgs","repos_url":"https://api.github.com/users/mrobinson/repos","events_url":"https://api.github.com/users/mrobinson/events{/privacy}","received_events_url":"https://api.github.com/users/mrobinson/received_events","type":"User","site_admin":false},"repo":{"id":18299566,"name":"servo","full_name":"mrobinson/servo","owner":{"login":"mrobinson","id":13536,"avatar_url":"https://avatars.githubusercontent.com/u/13536?v=3","gravatar_id":"","url":"https://api.github.com/users/mrobinson","html_url":"https://github.com/mrobinson","followers_url":"https://api.github.com/users/mrobinson/followers","following_url":"https://api.github.com/users/mrobinson/following{/other_user}","gists_url":"https://api.github.com/users/mrobinson/gists{/gist_id}","starred_url":"https://api.github.com/users/mrobinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrobinson/subscriptions","organizations_url":"https://api.github.com/users/mrobinson/orgs","repos_url":"https://api.github.com/users/mrobinson/repos","events_url":"https://api.github.com/users/mrobinson/events{/privacy}","received_events_url":"https://api.github.com/users/mrobinson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mrobinson/servo","description":"The Servo Browser Engine","fork":true,"url":"https://api.github.com/repos/mrobinson/servo","forks_url":"https://api.github.com/repos/mrobinson/servo/forks","keys_url":"https://api.github.com/repos/mrobinson/servo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrobinson/servo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrobinson/servo/teams","hooks_url":"https://api.github.com/repos/mrobinson/servo/hooks","issue_events_url":"https://api.github.com/repos/mrobinson/servo/issues/events{/number}","events_url":"https://api.github.com/repos/mrobinson/servo/events","assignees_url":"https://api.github.com/repos/mrobinson/servo/assignees{/user}","branches_url":"https://api.github.com/repos/mrobinson/servo/branches{/branch}","tags_url":"https://api.github.com/repos/mrobinson/servo/tags","blobs_url":"https://api.github.com/repos/mrobinson/servo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrobinson/servo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrobinson/servo/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrobinson/servo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrobinson/servo/statuses/{sha}","languages_url":"https://api.github.com/repos/mrobinson/servo/languages","stargazers_url":"https://api.github.com/repos/mrobinson/servo/stargazers","contributors_url":"https://api.github.com/repos/mrobinson/servo/contributors","subscribers_url":"https://api.github.com/repos/mrobinson/servo/subscribers","subscription_url":"https://api.github.com/repos/mrobinson/servo/subscription","commits_url":"https://api.github.com/repos/mrobinson/servo/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrobinson/servo/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrobinson/servo/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrobinson/servo/issues/comments/{number}","contents_url":"https://api.github.com/repos/mrobinson/servo/contents/{+path}","compare_url":"https://api.github.com/repos/mrobinson/servo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrobinson/servo/merges","archive_url":"https://api.github.com/repos/mrobinson/servo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrobinson/servo/downloads","issues_url":"https://api.github.com/repos/mrobinson/servo/issues{/number}","pulls_url":"https://api.github.com/repos/mrobinson/servo/pulls{/number}","milestones_url":"https://api.github.com/repos/mrobinson/servo/milestones{/number}","notifications_url":"https://api.github.com/repos/mrobinson/servo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrobinson/servo/labels{/name}","releases_url":"https://api.github.com/repos/mrobinson/servo/releases{/id}","created_at":"2014-03-31T16:17:52Z","updated_at":"2014-07-22T08:38:26Z","pushed_at":"2015-01-02T17:43:05Z","git_url":"git://github.com/mrobinson/servo.git","ssh_url":"git@github.com:mrobinson/servo.git","clone_url":"https://github.com/mrobinson/servo.git","svn_url":"https://github.com/mrobinson/servo","homepage":"","size":32568,"stargazers_count":0,"watchers_count":0,"language":"Rust","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":"master"}},"base":{"label":"servo:master","ref":"master","sha":"141b5d038fad3c0c44a6f1b309b8ca9edea54580","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":3390243,"name":"servo","full_name":"servo/servo","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/servo","description":"The Servo Browser Engine","fork":false,"url":"https://api.github.com/repos/servo/servo","forks_url":"https://api.github.com/repos/servo/servo/forks","keys_url":"https://api.github.com/repos/servo/servo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/servo/servo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/servo/servo/teams","hooks_url":"https://api.github.com/repos/servo/servo/hooks","issue_events_url":"https://api.github.com/repos/servo/servo/issues/events{/number}","events_url":"https://api.github.com/repos/servo/servo/events","assignees_url":"https://api.github.com/repos/servo/servo/assignees{/user}","branches_url":"https://api.github.com/repos/servo/servo/branches{/branch}","tags_url":"https://api.github.com/repos/servo/servo/tags","blobs_url":"https://api.github.com/repos/servo/servo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/servo/servo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/servo/servo/git/refs{/sha}","trees_url":"https://api.github.com/repos/servo/servo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/servo/servo/statuses/{sha}","languages_url":"https://api.github.com/repos/servo/servo/languages","stargazers_url":"https://api.github.com/repos/servo/servo/stargazers","contributors_url":"https://api.github.com/repos/servo/servo/contributors","subscribers_url":"https://api.github.com/repos/servo/servo/subscribers","subscription_url":"https://api.github.com/repos/servo/servo/subscription","commits_url":"https://api.github.com/repos/servo/servo/commits{/sha}","git_commits_url":"https://api.github.com/repos/servo/servo/git/commits{/sha}","comments_url":"https://api.github.com/repos/servo/servo/comments{/number}","issue_comment_url":"https://api.github.com/repos/servo/servo/issues/comments/{number}","contents_url":"https://api.github.com/repos/servo/servo/contents/{+path}","compare_url":"https://api.github.com/repos/servo/servo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/servo/servo/merges","archive_url":"https://api.github.com/repos/servo/servo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/servo/servo/downloads","issues_url":"https://api.github.com/repos/servo/servo/issues{/number}","pulls_url":"https://api.github.com/repos/servo/servo/pulls{/number}","milestones_url":"https://api.github.com/repos/servo/servo/milestones{/number}","notifications_url":"https://api.github.com/repos/servo/servo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/servo/servo/labels{/name}","releases_url":"https://api.github.com/repos/servo/servo/releases{/id}","created_at":"2012-02-08T19:07:25Z","updated_at":"2015-01-02T17:06:09Z","pushed_at":"2015-01-02T21:52:52Z","git_url":"git://github.com/servo/servo.git","ssh_url":"git@github.com:servo/servo.git","clone_url":"https://github.com/servo/servo.git","svn_url":"https://github.com/servo/servo","homepage":"","size":70782,"stargazers_count":2792,"watchers_count":2792,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":482,"mirror_url":null,"open_issues_count":757,"forks":482,"open_issues":757,"watchers":2792,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/servo/servo/pulls/4536"},"html":{"href":"https://github.com/servo/servo/pull/4536"},"issue":{"href":"https://api.github.com/repos/servo/servo/issues/4536"},"comments":{"href":"https://api.github.com/repos/servo/servo/issues/4536/comments"},"review_comments":{"href":"https://api.github.com/repos/servo/servo/pulls/4536/comments"},"review_comment":{"href":"https://api.github.com/repos/servo/servo/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/servo/servo/pulls/4536/commits"},"statuses":{"href":"https://api.github.com/repos/servo/servo/statuses/797decbbc47e2f342002133be6ed0b9cf55b623c"}}}}