diff options
author | George Roman <george.roman.99@gmail.com> | 2019-08-09 20:30:56 +0300 |
---|---|---|
committer | George Roman <george.roman.99@gmail.com> | 2019-08-20 00:52:46 +0300 |
commit | d3696baf27fb77d67b012a90403b6c699ca40484 (patch) | |
tree | c88883dd1e912a51c1b9a0752c1d5b8b78a96007 /components/compositing/compositor_thread.rs | |
parent | a084997afee23bb541e89a807905ff1c815a649e (diff) | |
download | servo-d3696baf27fb77d67b012a90403b6c699ca40484.tar.gz servo-d3696baf27fb77d67b012a90403b6c699ca40484.zip |
Implement TakeElementScreenshot WebDriver command
Diffstat (limited to 'components/compositing/compositor_thread.rs')
-rw-r--r-- | components/compositing/compositor_thread.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/components/compositing/compositor_thread.rs b/components/compositing/compositor_thread.rs index f095ab65b1c..e10aff78844 100644 --- a/components/compositing/compositor_thread.rs +++ b/components/compositing/compositor_thread.rs @@ -8,6 +8,7 @@ use crate::compositor::CompositingReason; use crate::SendableFrameTree; use crossbeam_channel::{Receiver, Sender}; use embedder_traits::EventLoopWaker; +use euclid::Rect; use gfx_traits::Epoch; use ipc_channel::ipc::IpcSender; use msg::constellation_msg::{PipelineId, TopLevelBrowsingContextId}; @@ -17,6 +18,7 @@ use profile_traits::time; use script_traits::{AnimationState, ConstellationMsg, EventResult, MouseButton, MouseEventType}; use std::fmt::{Debug, Error, Formatter}; use style_traits::viewport::ViewportConstraints; +use style_traits::CSSPixel; use webrender_api; use webrender_api::units::{DeviceIntPoint, DeviceIntSize}; use webvr_traits::WebVRMainThreadHeartbeat; @@ -80,7 +82,7 @@ pub enum Msg { /// Script has handled a touch event, and either prevented or allowed default actions. TouchEventProcessed(EventResult), /// Composite to a PNG file and return the Image over a passed channel. - CreatePng(IpcSender<Option<Image>>), + CreatePng(Option<Rect<f32, CSSPixel>>, IpcSender<Option<Image>>), /// Alerts the compositor that the viewport has been constrained in some manner ViewportConstrained(PipelineId, ViewportConstraints), /// A reply to the compositor asking if the output image is stable. |