Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(609)

Unified Diff: remoting/client/frame_consumer_proxy.cc

Issue 1288063004: Simplify FrameConsumer interface. Remove FrameProducer interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/client/frame_consumer_proxy.h ('k') | remoting/client/frame_producer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/frame_consumer_proxy.cc
diff --git a/remoting/client/frame_consumer_proxy.cc b/remoting/client/frame_consumer_proxy.cc
deleted file mode 100644
index 21d03bfc663d3948e0cd40487a5077c9d2ff35db..0000000000000000000000000000000000000000
--- a/remoting/client/frame_consumer_proxy.cc
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "remoting/client/frame_consumer_proxy.h"
-
-#include "base/bind.h"
-#include "base/location.h"
-#include "base/single_thread_task_runner.h"
-#include "base/thread_task_runner_handle.h"
-#include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
-#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
-#include "third_party/webrtc/modules/desktop_capture/desktop_region.h"
-
-namespace remoting {
-
-FrameConsumerProxy::FrameConsumerProxy(
- const base::WeakPtr<FrameConsumer>& frame_consumer)
- : frame_consumer_(frame_consumer),
- task_runner_(base::ThreadTaskRunnerHandle::Get()) {
- pixel_format_ = frame_consumer_->GetPixelFormat();
-}
-
-static void DoApplyBuffer(base::WeakPtr<FrameConsumer> frame_consumer,
- const webrtc::DesktopSize& view_size,
- const webrtc::DesktopRect& clip_area,
- webrtc::DesktopFrame* buffer,
- const webrtc::DesktopRegion& region,
- scoped_ptr<webrtc::DesktopRegion> shape) {
- if (!frame_consumer)
- return;
-
- frame_consumer->ApplyBuffer(view_size, clip_area, buffer, region,
- shape.get());
-}
-
-void FrameConsumerProxy::ApplyBuffer(const webrtc::DesktopSize& view_size,
- const webrtc::DesktopRect& clip_area,
- webrtc::DesktopFrame* buffer,
- const webrtc::DesktopRegion& region,
- const webrtc::DesktopRegion* shape) {
- scoped_ptr<webrtc::DesktopRegion> shape_ptr;
- if (shape)
- shape_ptr = make_scoped_ptr(new webrtc::DesktopRegion(*shape));
- task_runner_->PostTask(
- FROM_HERE,
- base::Bind(DoApplyBuffer, frame_consumer_, view_size, clip_area, buffer,
- region, base::Passed(&shape_ptr)));
-}
-
-void FrameConsumerProxy::ReturnBuffer(webrtc::DesktopFrame* buffer) {
- task_runner_->PostTask(FROM_HERE, base::Bind(&FrameConsumer::ReturnBuffer,
- frame_consumer_, buffer));
-}
-
-void FrameConsumerProxy::SetSourceSize(
- const webrtc::DesktopSize& source_size,
- const webrtc::DesktopVector& source_dpi) {
- task_runner_->PostTask(
- FROM_HERE, base::Bind(&FrameConsumer::SetSourceSize, frame_consumer_,
- source_size, source_dpi));
-}
-
-FrameConsumer::PixelFormat FrameConsumerProxy::GetPixelFormat() {
- return pixel_format_;
-}
-
-FrameConsumerProxy::~FrameConsumerProxy() {
-}
-
-} // namespace remoting
« no previous file with comments | « remoting/client/frame_consumer_proxy.h ('k') | remoting/client/frame_producer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698