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

Unified Diff: remoting/client/frame_consumer_proxy.cc

Issue 23677011: Byte-swap the video frame pixels before passing them to Java. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Narrow the synchronization block Created 7 years, 3 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/jni/chromoting_jni_instance.cc » ('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
index 4c7d79f53b217ad67b6ba1af4f55198a728b9625..a1b389550c290ece3eb2e58475bb142238a3afc9 100644
--- a/remoting/client/frame_consumer_proxy.cc
+++ b/remoting/client/frame_consumer_proxy.cc
@@ -14,8 +14,11 @@
namespace remoting {
FrameConsumerProxy::FrameConsumerProxy(
- scoped_refptr<base::SingleThreadTaskRunner> task_runner)
- : task_runner_(task_runner) {
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner,
+ const base::WeakPtr<FrameConsumer>& frame_consumer)
+ : frame_consumer_(frame_consumer),
+ task_runner_(task_runner) {
+ pixel_format_ = frame_consumer_->GetPixelFormat();
}
void FrameConsumerProxy::ApplyBuffer(const webrtc::DesktopSize& view_size,
@@ -57,11 +60,8 @@ void FrameConsumerProxy::SetSourceSize(
frame_consumer_->SetSourceSize(source_size, source_dpi);
}
-void FrameConsumerProxy::Attach(
- const base::WeakPtr<FrameConsumer>& frame_consumer) {
- DCHECK(task_runner_->BelongsToCurrentThread());
- DCHECK(frame_consumer_.get() == NULL);
- frame_consumer_ = frame_consumer;
+FrameConsumer::PixelFormat FrameConsumerProxy::GetPixelFormat() {
+ return pixel_format_;
}
FrameConsumerProxy::~FrameConsumerProxy() {
« no previous file with comments | « remoting/client/frame_consumer_proxy.h ('k') | remoting/client/jni/chromoting_jni_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698