diff options
author | bors-servo <metajack+bors@gmail.com> | 2015-05-07 04:59:04 -0500 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2015-05-07 04:59:04 -0500 |
commit | 63ba1cb69b80d70c1d893ba80edd802cd326316d (patch) | |
tree | 7b2cfe37d0483c46350773bfc98fa248d0e20ac7 /components/compositing/compositor_task.rs | |
parent | 0ec6d80b6ed61c6950b8e5f50d04f994f0021101 (diff) | |
parent | 5311d9ab592fe1efcf427ad62437a6e224ba2116 (diff) | |
download | servo-63ba1cb69b80d70c1d893ba80edd802cd326316d.tar.gz servo-63ba1cb69b80d70c1d893ba80edd802cd326316d.zip |
Auto merge of #5884 - jgraham:webdriver_screenshot, r=jdm
This adds support for compositing to a PNG without actually quiting
the browser.
Cargo bits need to be updated after the upstream changes to rust-png land.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5884)
<!-- Reviewable:end -->
Diffstat (limited to 'components/compositing/compositor_task.rs')
-rw-r--r-- | components/compositing/compositor_task.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/components/compositing/compositor_task.rs b/components/compositing/compositor_task.rs index c64f3bfeb5e..bed4255e34b 100644 --- a/components/compositing/compositor_task.rs +++ b/components/compositing/compositor_task.rs @@ -23,6 +23,7 @@ use msg::constellation_msg::{AnimationState, ConstellationChan, PipelineId}; use msg::constellation_msg::{Key, KeyState, KeyModifiers}; use profile_traits::mem; use profile_traits::time; +use png; use std::sync::mpsc::{channel, Sender, Receiver}; use std::fmt::{Error, Formatter, Debug}; use std::rc::Rc; @@ -218,6 +219,8 @@ pub enum Msg { KeyEvent(Key, KeyState, KeyModifiers), /// Changes the cursor. SetCursor(Cursor), + /// Composite to a PNG file and return the Image over a passed channel. + CreatePng(Sender<Option<png::Image>>), /// Informs the compositor that the paint task for the given pipeline has exited. PaintTaskExited(PipelineId), /// Alerts the compositor that the viewport has been constrained in some manner @@ -247,6 +250,7 @@ impl Debug for Msg { Msg::RecompositeAfterScroll => write!(f, "RecompositeAfterScroll"), Msg::KeyEvent(..) => write!(f, "KeyEvent"), Msg::SetCursor(..) => write!(f, "SetCursor"), + Msg::CreatePng(..) => write!(f, "CreatePng"), Msg::PaintTaskExited(..) => write!(f, "PaintTaskExited"), Msg::ViewportConstrained(..) => write!(f, "ViewportConstrained"), } |