aboutsummaryrefslogtreecommitdiffstats
path: root/components/servo/lib.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2018-03-16 13:49:17 -0400
committerGitHub <noreply@github.com>2018-03-16 13:49:17 -0400
commit1ae5715309ab5acb9ac401fd99f34a0667b2ee53 (patch)
tree01977d5f5bc7a8af92323ecc4a07efc9d122f0c5 /components/servo/lib.rs
parentf5c1f5117e4de30a02d2614c23a52fc863231d51 (diff)
parentee637dc26ee98f297cf5913f744e2f4824a6fa8b (diff)
downloadservo-1ae5715309ab5acb9ac401fd99f34a0667b2ee53.tar.gz
servo-1ae5715309ab5acb9ac401fd99f34a0667b2ee53.zip
Auto merge of #20315 - kwonoj:feat-webrender-capture, r=jdm
feat(window): bind hotkey to trigger capture event <!-- Please describe your changes on the following line: --> Relates to #20295. This PR intends to expose additional hotkey to window to allow capture webrender. Internally it adds one new `WindowEvent::CaptureWebRender` for those purpose. I took some liberty to make some decisions around which need to be reviewed & updated in PR. - `Ctrl-shift-3` is binded to hotkey to follow described in Gecko's behavior. Is it good to go? - Maybe do not need to create new event `CaptureWebRender` but reuse `ToggleWebRenderDebug`, having additional `WebRenderDebugOption` values? : This sounds more right path for me, but `capture` isn't really `toggle` behavior to include capture into it. - Capturing will create `capture_webrender` in cwd, creates new folder inside each time new capture stored : Maybe it'd better to expose new cmdline args allow overrides, or some better way else. I took the simple approach to generate path without asking for it. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #20295 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ - This change has manually verified on local machines (mac, windows, linux). <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20315) <!-- Reviewable:end -->
Diffstat (limited to 'components/servo/lib.rs')
-rw-r--r--components/servo/lib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/components/servo/lib.rs b/components/servo/lib.rs
index 45b6af50c89..f5ebed9f04d 100644
--- a/components/servo/lib.rs
+++ b/components/servo/lib.rs
@@ -333,6 +333,10 @@ impl<Window> Servo<Window> where Window: WindowMethods + 'static {
self.compositor.toggle_webrender_debug(option);
}
+ WindowEvent::CaptureWebRender => {
+ self.compositor.capture_webrender();
+ }
+
WindowEvent::NewBrowser(url, response_chan) => {
let msg = ConstellationMsg::NewBrowser(url, response_chan);
if let Err(e) = self.constellation_chan.send(msg) {