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

Side by Side Diff: remoting/protocol/frame_consumer.h

Issue 2156713002: [Chromoting] Implement DualBufferFrameConsumer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change last_desktop_size_ only when it is changed. Created 4 years, 5 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_PROTOCOL_FRAME_CONSUMER_H_ 5 #ifndef REMOTING_PROTOCOL_FRAME_CONSUMER_H_
6 #define REMOTING_PROTOCOL_FRAME_CONSUMER_H_ 6 #define REMOTING_PROTOCOL_FRAME_CONSUMER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 12
13 namespace webrtc { 13 namespace webrtc {
14 class DesktopFrame; 14 class DesktopFrame;
15 class DesktopSize; 15 class DesktopSize;
16 } // namespace webrtc 16 } // namespace webrtc
17 17
18 namespace remoting { 18 namespace remoting {
19 namespace protocol { 19 namespace protocol {
20 20
21 class FrameConsumer { 21 class FrameConsumer {
22 public: 22 public:
23 virtual ~FrameConsumer() {}
24
23 // List of supported pixel formats needed by various platforms. 25 // List of supported pixel formats needed by various platforms.
24 enum PixelFormat { 26 enum PixelFormat {
25 FORMAT_BGRA, // Used by the Pepper plugin. 27 FORMAT_BGRA, // Used by the Pepper plugin.
26 FORMAT_RGBA, // Used for Android's Bitmap class. 28 FORMAT_RGBA, // Used for Android's Bitmap class.
27 }; 29 };
28 30
29 virtual std::unique_ptr<webrtc::DesktopFrame> AllocateFrame( 31 virtual std::unique_ptr<webrtc::DesktopFrame> AllocateFrame(
30 const webrtc::DesktopSize& size) = 0; 32 const webrtc::DesktopSize& size) = 0;
31 33
32 virtual void DrawFrame(std::unique_ptr<webrtc::DesktopFrame> frame, 34 virtual void DrawFrame(std::unique_ptr<webrtc::DesktopFrame> frame,
33 const base::Closure& done) = 0; 35 const base::Closure& done) = 0;
34 36
35 // Returns the preferred pixel encoding for the platform. 37 // Returns the preferred pixel encoding for the platform.
36 virtual PixelFormat GetPixelFormat() = 0; 38 virtual PixelFormat GetPixelFormat() = 0;
37 39
38 protected: 40 protected:
39 FrameConsumer() {} 41 FrameConsumer() {}
40 virtual ~FrameConsumer() {}
41 42
42 private: 43 private:
43 DISALLOW_COPY_AND_ASSIGN(FrameConsumer); 44 DISALLOW_COPY_AND_ASSIGN(FrameConsumer);
44 }; 45 };
45 46
46 } // namespace protocol 47 } // namespace protocol
47 } // namespace remoting 48 } // namespace remoting
48 49
49 #endif // REMOTING_PROTOCOL_FRAME_CONSUMER_H_ 50 #endif // REMOTING_PROTOCOL_FRAME_CONSUMER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698