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/software_video_renderer.cc | |
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/software_video_renderer.cc')
-rw-r--r-- | remoting/client/software_video_renderer.cc | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/remoting/client/software_video_renderer.cc b/remoting/client/software_video_renderer.cc index 748c2bf..05edf5b 100644 --- a/remoting/client/software_video_renderer.cc +++ b/remoting/client/software_video_renderer.cc @@ -80,7 +80,7 @@ class SoftwareVideoRenderer::Core { public: Core(scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, scoped_refptr<base::SingleThreadTaskRunner> decode_task_runner, - scoped_refptr<FrameConsumerProxy> consumer); + scoped_ptr<FrameConsumerProxy> consumer); ~Core(); void OnSessionConfig(const protocol::SessionConfig& config); @@ -104,7 +104,7 @@ class SoftwareVideoRenderer::Core { scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; scoped_refptr<base::SingleThreadTaskRunner> decode_task_runner_; - scoped_refptr<FrameConsumerProxy> consumer_; + scoped_ptr<FrameConsumerProxy> consumer_; scoped_ptr<VideoDecoder> decoder_; // Remote screen size in pixels. @@ -129,13 +129,12 @@ class SoftwareVideoRenderer::Core { SoftwareVideoRenderer::Core::Core( scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, scoped_refptr<base::SingleThreadTaskRunner> decode_task_runner, - scoped_refptr<FrameConsumerProxy> consumer) + scoped_ptr<FrameConsumerProxy> consumer) : main_task_runner_(main_task_runner), decode_task_runner_(decode_task_runner), - consumer_(consumer), + consumer_(consumer.Pass()), paint_scheduled_(false), - weak_factory_(this) { -} + weak_factory_(this) {} SoftwareVideoRenderer::Core::~Core() { } @@ -242,7 +241,7 @@ void SoftwareVideoRenderer::Core::DoPaint() { if (!output_region.is_empty()) { buffers_.pop_front(); consumer_->ApplyBuffer(view_size_, clip_area_, buffer, output_region, - *decoder_->GetImageShape()); + decoder_->GetImageShape()); } } @@ -315,9 +314,9 @@ void SoftwareVideoRenderer::Core::SetOutputSizeAndClip( SoftwareVideoRenderer::SoftwareVideoRenderer( scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, scoped_refptr<base::SingleThreadTaskRunner> decode_task_runner, - scoped_refptr<FrameConsumerProxy> consumer) + scoped_ptr<FrameConsumerProxy> consumer) : decode_task_runner_(decode_task_runner), - core_(new Core(main_task_runner, decode_task_runner, consumer)), + core_(new Core(main_task_runner, decode_task_runner, consumer.Pass())), latest_event_timestamp_(0), weak_factory_(this) { DCHECK(CalledOnValidThread()); |