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

Side by Side Diff: remoting/client/rectangle_update_decoder.h

Issue 23440046: Remove dependency on Skia from chromoting client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
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 #ifndef REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H_ 5 #ifndef REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H_
6 #define REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H_ 6 #define REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 45 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
46 scoped_refptr<base::SingleThreadTaskRunner> decode_task_runner, 46 scoped_refptr<base::SingleThreadTaskRunner> decode_task_runner,
47 scoped_refptr<FrameConsumerProxy> consumer); 47 scoped_refptr<FrameConsumerProxy> consumer);
48 48
49 // Initializes decoder with the information from the protocol config. 49 // Initializes decoder with the information from the protocol config.
50 void Initialize(const protocol::SessionConfig& config); 50 void Initialize(const protocol::SessionConfig& config);
51 51
52 // FrameProducer implementation. These methods may be called before we are 52 // FrameProducer implementation. These methods may be called before we are
53 // Initialize()d, or we know the source screen size. 53 // Initialize()d, or we know the source screen size.
54 virtual void DrawBuffer(webrtc::DesktopFrame* buffer) OVERRIDE; 54 virtual void DrawBuffer(webrtc::DesktopFrame* buffer) OVERRIDE;
55 virtual void InvalidateRegion(const SkRegion& region) OVERRIDE; 55 virtual void InvalidateRegion(const webrtc::DesktopRegion& region) OVERRIDE;
56 virtual void RequestReturnBuffers(const base::Closure& done) OVERRIDE; 56 virtual void RequestReturnBuffers(const base::Closure& done) OVERRIDE;
57 virtual void SetOutputSizeAndClip(const SkISize& view_size, 57 virtual void SetOutputSizeAndClip(
58 const SkIRect& clip_area) OVERRIDE; 58 const webrtc::DesktopSize& view_size,
59 virtual const SkRegion* GetBufferShape() OVERRIDE; 59 const webrtc::DesktopRect& clip_area) OVERRIDE;
60 virtual const webrtc::DesktopRegion* GetBufferShape() OVERRIDE;
60 61
61 // VideoStub implementation. 62 // VideoStub implementation.
62 virtual void ProcessVideoPacket(scoped_ptr<VideoPacket> packet, 63 virtual void ProcessVideoPacket(scoped_ptr<VideoPacket> packet,
63 const base::Closure& done) OVERRIDE; 64 const base::Closure& done) OVERRIDE;
64 65
65 // Return the stats recorded by this client. 66 // Return the stats recorded by this client.
66 ChromotingStats* GetStats(); 67 ChromotingStats* GetStats();
67 68
68 private: 69 private:
69 friend class base::RefCountedThreadSafe<RectangleUpdateDecoder>; 70 friend class base::RefCountedThreadSafe<RectangleUpdateDecoder>;
(...skipping 12 matching lines...) Expand all
82 // Callback method when a VideoPacket is processed. |decode_start| contains 83 // Callback method when a VideoPacket is processed. |decode_start| contains
83 // the timestamp when the packet will start to be processed. 84 // the timestamp when the packet will start to be processed.
84 void OnPacketDone(base::Time decode_start, const base::Closure& done); 85 void OnPacketDone(base::Time decode_start, const base::Closure& done);
85 86
86 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; 87 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
87 scoped_refptr<base::SingleThreadTaskRunner> decode_task_runner_; 88 scoped_refptr<base::SingleThreadTaskRunner> decode_task_runner_;
88 scoped_refptr<FrameConsumerProxy> consumer_; 89 scoped_refptr<FrameConsumerProxy> consumer_;
89 scoped_ptr<VideoDecoder> decoder_; 90 scoped_ptr<VideoDecoder> decoder_;
90 91
91 // Remote screen size in pixels. 92 // Remote screen size in pixels.
92 SkISize source_size_; 93 webrtc::DesktopSize source_size_;
93 94
94 // Vertical and horizontal DPI of the remote screen. 95 // Vertical and horizontal DPI of the remote screen.
95 SkIPoint source_dpi_; 96 webrtc::DesktopVector source_dpi_;
96 97
97 // The current dimensions of the frame consumer view. 98 // The current dimensions of the frame consumer view.
98 SkISize view_size_; 99 webrtc::DesktopSize view_size_;
99 SkIRect clip_area_; 100 webrtc::DesktopRect clip_area_;
100 101
101 // The drawing buffers supplied by the frame consumer. 102 // The drawing buffers supplied by the frame consumer.
102 std::list<webrtc::DesktopFrame*> buffers_; 103 std::list<webrtc::DesktopFrame*> buffers_;
103 104
104 // Flag used to coalesce runs of SchedulePaint()s into a single DoPaint(). 105 // Flag used to coalesce runs of SchedulePaint()s into a single DoPaint().
105 bool paint_scheduled_; 106 bool paint_scheduled_;
106 107
107 ChromotingStats stats_; 108 ChromotingStats stats_;
108 109
109 // Keep track of the most recent sequence number bounced back from the host. 110 // Keep track of the most recent sequence number bounced back from the host.
110 int64 latest_sequence_number_; 111 int64 latest_sequence_number_;
111 }; 112 };
112 113
113 } // namespace remoting 114 } // namespace remoting
114 115
115 #endif // REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H_ 116 #endif // REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698