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

Side by Side 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: rebase (for Skia removal) Created 7 years, 2 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 unified diff | Download patch
« no previous file with comments | « remoting/client/frame_consumer_proxy.h ('k') | remoting/client/jni/jni_frame_consumer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/client/frame_consumer_proxy.h" 5 #include "remoting/client/frame_consumer_proxy.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" 10 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 if (!task_runner_->BelongsToCurrentThread()) { 50 if (!task_runner_->BelongsToCurrentThread()) {
51 task_runner_->PostTask(FROM_HERE, base::Bind( 51 task_runner_->PostTask(FROM_HERE, base::Bind(
52 &FrameConsumerProxy::SetSourceSize, this, source_size, source_dpi)); 52 &FrameConsumerProxy::SetSourceSize, this, source_size, source_dpi));
53 return; 53 return;
54 } 54 }
55 55
56 if (frame_consumer_.get()) 56 if (frame_consumer_.get())
57 frame_consumer_->SetSourceSize(source_size, source_dpi); 57 frame_consumer_->SetSourceSize(source_size, source_dpi);
58 } 58 }
59 59
60 FrameConsumer::PixelFormat FrameConsumerProxy::GetPixelFormat() {
61 return pixel_format_;
Sergey Ulanov 2013/09/27 21:51:13 This value is set on a different thread. It's not
Lambros 2013/09/28 00:22:18 Done.
62 }
63
60 void FrameConsumerProxy::Attach( 64 void FrameConsumerProxy::Attach(
61 const base::WeakPtr<FrameConsumer>& frame_consumer) { 65 const base::WeakPtr<FrameConsumer>& frame_consumer) {
62 DCHECK(task_runner_->BelongsToCurrentThread()); 66 DCHECK(task_runner_->BelongsToCurrentThread());
63 DCHECK(frame_consumer_.get() == NULL); 67 DCHECK(frame_consumer_.get() == NULL);
64 frame_consumer_ = frame_consumer; 68 frame_consumer_ = frame_consumer;
69
70 pixel_format_ = frame_consumer_->GetPixelFormat();
65 } 71 }
66 72
67 FrameConsumerProxy::~FrameConsumerProxy() { 73 FrameConsumerProxy::~FrameConsumerProxy() {
68 } 74 }
69 75
70 } // namespace remoting 76 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/frame_consumer_proxy.h ('k') | remoting/client/jni/jni_frame_consumer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698