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

Side by Side Diff: remoting/client/frame_consumer_proxy.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: Add PixelFormat to FrameConsumer interface 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 (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 // FrameConsumerProxy is used to allow a FrameConsumer on the UI thread to be 5 // FrameConsumerProxy is used to allow a FrameConsumer on the UI thread to be
6 // invoked by a Decoder on the decoder thread. The Detach() method is used by 6 // invoked by a Decoder on the decoder thread. The Detach() method is used by
7 // the proxy's owner before tearing down the FrameConsumer, to prevent any 7 // the proxy's owner before tearing down the FrameConsumer, to prevent any
8 // further invokations reaching it. 8 // further invokations reaching it.
9 9
10 #ifndef REMOTING_CLIENT_FRAME_CONSUMER_PROXY_H_ 10 #ifndef REMOTING_CLIENT_FRAME_CONSUMER_PROXY_H_
(...skipping 18 matching lines...) Expand all
29 FrameConsumerProxy(scoped_refptr<base::SingleThreadTaskRunner> task_runner); 29 FrameConsumerProxy(scoped_refptr<base::SingleThreadTaskRunner> task_runner);
30 30
31 // FrameConsumer implementation. 31 // FrameConsumer implementation.
32 virtual void ApplyBuffer(const SkISize& view_size, 32 virtual void ApplyBuffer(const SkISize& view_size,
33 const SkIRect& clip_area, 33 const SkIRect& clip_area,
34 webrtc::DesktopFrame* buffer, 34 webrtc::DesktopFrame* buffer,
35 const SkRegion& region) OVERRIDE; 35 const SkRegion& region) OVERRIDE;
36 virtual void ReturnBuffer(webrtc::DesktopFrame* buffer) OVERRIDE; 36 virtual void ReturnBuffer(webrtc::DesktopFrame* buffer) OVERRIDE;
37 virtual void SetSourceSize(const SkISize& source_size, 37 virtual void SetSourceSize(const SkISize& source_size,
38 const SkIPoint& dpi) OVERRIDE; 38 const SkIPoint& dpi) OVERRIDE;
39 virtual PixelFormat GetPixelFormat() OVERRIDE;
39 40
40 // Attaches to |frame_consumer_|. 41 // Attaches to |frame_consumer_|.
41 // This must only be called from |frame_consumer_message_loop_|. 42 // This must only be called from |frame_consumer_message_loop_|.
42 void Attach(const base::WeakPtr<FrameConsumer>& frame_consumer); 43 void Attach(const base::WeakPtr<FrameConsumer>& frame_consumer);
43 44
44 private: 45 private:
45 friend class base::RefCountedThreadSafe<FrameConsumerProxy>; 46 friend class base::RefCountedThreadSafe<FrameConsumerProxy>;
46 virtual ~FrameConsumerProxy(); 47 virtual ~FrameConsumerProxy();
47 48
48 base::WeakPtr<FrameConsumer> frame_consumer_; 49 base::WeakPtr<FrameConsumer> frame_consumer_;
49 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 50 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
50 51
52 PixelFormat pixel_format_;
53
51 DISALLOW_COPY_AND_ASSIGN(FrameConsumerProxy); 54 DISALLOW_COPY_AND_ASSIGN(FrameConsumerProxy);
52 }; 55 };
53 56
54 } // namespace remoting 57 } // namespace remoting
55 58
56 #endif // REMOTING_CLIENT_FRAME_CONSUMER_PROXY_H_ 59 #endif // REMOTING_CLIENT_FRAME_CONSUMER_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698