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

Side by Side Diff: remoting/client/jni/jni_frame_consumer.h

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, 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef REMOTING_CLIENT_JNI_JNI_FRAME_CONSUMER_H_ 5 #ifndef REMOTING_CLIENT_JNI_JNI_FRAME_CONSUMER_H_
6 #define REMOTING_CLIENT_JNI_JNI_FRAME_CONSUMER_H_ 6 #define REMOTING_CLIENT_JNI_JNI_FRAME_CONSUMER_H_
7 7
8 #include "remoting/client/frame_consumer.h" 8 #include "remoting/client/frame_consumer.h"
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 19 matching lines...) Expand all
30 void set_frame_producer(FrameProducer* producer); 30 void set_frame_producer(FrameProducer* producer);
31 31
32 // FrameConsumer implementation. 32 // FrameConsumer implementation.
33 virtual void ApplyBuffer(const webrtc::DesktopSize& view_size, 33 virtual void ApplyBuffer(const webrtc::DesktopSize& view_size,
34 const webrtc::DesktopRect& clip_area, 34 const webrtc::DesktopRect& clip_area,
35 webrtc::DesktopFrame* buffer, 35 webrtc::DesktopFrame* buffer,
36 const webrtc::DesktopRegion& region) OVERRIDE; 36 const webrtc::DesktopRegion& region) OVERRIDE;
37 virtual void ReturnBuffer(webrtc::DesktopFrame* buffer) OVERRIDE; 37 virtual void ReturnBuffer(webrtc::DesktopFrame* buffer) OVERRIDE;
38 virtual void SetSourceSize(const webrtc::DesktopSize& source_size, 38 virtual void SetSourceSize(const webrtc::DesktopSize& source_size,
39 const webrtc::DesktopVector& dpi) OVERRIDE; 39 const webrtc::DesktopVector& dpi) OVERRIDE;
40 virtual PixelFormat GetPixelFormat() OVERRIDE;
40 41
41 private: 42 private:
42 // Variables are to be used from the display thread. 43 // Variables are to be used from the display thread.
43 44
44 // Used to obtain task runner references and make calls to Java methods. 45 // Used to obtain task runner references and make calls to Java methods.
45 ChromotingJniRuntime* jni_runtime_; 46 ChromotingJniRuntime* jni_runtime_;
46 47
47 // Whether we're currently in the constructor, and should deallocate the 48 // Whether we're currently in the constructor, and should deallocate the
48 // buffer instead of passing it back to the producer. 49 // buffer instead of passing it back to the producer.
49 bool in_dtor_; 50 bool in_dtor_;
50 51
51 FrameProducer* frame_producer_; 52 FrameProducer* frame_producer_;
52 webrtc::DesktopSize view_size_; 53 webrtc::DesktopSize view_size_;
53 webrtc::DesktopRect clip_area_; 54 webrtc::DesktopRect clip_area_;
54 55
55 // If |provide_buffer_|, allocates a new buffer of |view_size_|, informs 56 // If |provide_buffer_|, allocates a new buffer of |view_size_|, informs
56 // Java about it, and tells the producer to draw onto it. Otherwise, no-op. 57 // Java about it, and tells the producer to draw onto it. Otherwise, no-op.
57 void AllocateBuffer(); 58 void AllocateBuffer();
58 59
59 DISALLOW_COPY_AND_ASSIGN(JniFrameConsumer); 60 DISALLOW_COPY_AND_ASSIGN(JniFrameConsumer);
60 }; 61 };
61 62
62 } // namespace remoting 63 } // namespace remoting
63 64
64 #endif 65 #endif
OLDNEW
« no previous file with comments | « remoting/client/jni/chromoting_jni_instance.cc ('k') | remoting/client/jni/jni_frame_consumer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698