diff options
author | wez <wez@chromium.org> | 2015-07-16 20:19:15 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-17 03:19:47 +0000 |
commit | 070889be6cd0ff3425d6260fbaac59ed24f34627 (patch) | |
tree | c632b4fce22c055542e0b03f4ab4653ab14c0331 /remoting/client/frame_consumer.h | |
parent | 78b7284f164e10ecb382196bf38692410d11103b (diff) | |
download | chromium_src-070889be6cd0ff3425d6260fbaac59ed24f34627.zip chromium_src-070889be6cd0ff3425d6260fbaac59ed24f34627.tar.gz chromium_src-070889be6cd0ff3425d6260fbaac59ed24f34627.tar.bz2 |
Allow shaped-desktop hosts to send shape only when it changes.
Previously hosts supplying a shaped desktop needed to attach the desktop
shape to every frame, wasting bandwidth since the shape changes
relatively infrequently.
This CL updates the VideoRenderer implementations to preserve the shape
(or lack of one) from the preceding frame if the VideoPacket does not
include the use_desktop_shape field.
Also simplifies FrameConsumerProxy to remove the need for ref-counting,
updates NULL->nullptr throughout remoting/codec/, and removes
unnecessary transparency logic from VideoDecoderVpx.
BUG=446288
Review URL: https://codereview.chromium.org/1236663002
Cr-Commit-Position: refs/heads/master@{#339212}
Diffstat (limited to 'remoting/client/frame_consumer.h')
-rw-r--r-- | remoting/client/frame_consumer.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/remoting/client/frame_consumer.h b/remoting/client/frame_consumer.h index 0996332..ab6f16e 100644 --- a/remoting/client/frame_consumer.h +++ b/remoting/client/frame_consumer.h @@ -26,19 +26,20 @@ class FrameConsumer { FORMAT_RGBA, // Used for Android's Bitmap class. }; - // Accepts a buffer to be painted to the screen. The buffer's dimensions and - // relative position within the frame are specified by |clip_area|. Only - // pixels falling within |region| and the current clipping area are painted. - // The function assumes that the passed buffer was scaled to fit a window - // having |view_size| dimensions. + // Paints the contents of |buffer| into the area of the view identified + // by |clip_area|. |view_size| specifies the full-frame dimensions to which + // the |buffer|/|clip_area| portion was scaled. Implementations may be + // optimized to only paint pixels within the intersection of |region| and + // |clip_area|. If |shape| is non-NULL then it specifies the complete shape + // of the frame, otherwise the frame is un-shaped. // - // N.B. Both |clip_area| and |region| are in output coordinates relative to - // the frame. + // N.B. |clip_area|, |region| and |shape| should be provided in output view + // coordinates. virtual void ApplyBuffer(const webrtc::DesktopSize& view_size, const webrtc::DesktopRect& clip_area, webrtc::DesktopFrame* buffer, const webrtc::DesktopRegion& region, - const webrtc::DesktopRegion& shape) = 0; + const webrtc::DesktopRegion* shape) = 0; // Accepts a buffer that couldn't be used for drawing for any reason (shutdown // is in progress, the view area has changed, etc.). The accepted buffer can |