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

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

Issue 8954003: Revised sub-rectangle scaling for use in Chromoting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Replace bounds-check on loop with a DCHECK. Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/task.h" 9 #include "base/task.h"
10 #include "media/base/video_frame.h" 10 #include "media/base/video_frame.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 void RefreshFullFrame(); 55 void RefreshFullFrame();
56 56
57 private: 57 private:
58 friend class base::RefCountedThreadSafe<RectangleUpdateDecoder>; 58 friend class base::RefCountedThreadSafe<RectangleUpdateDecoder>;
59 friend class PartialFrameCleanup; 59 friend class PartialFrameCleanup;
60 60
61 ~RectangleUpdateDecoder(); 61 ~RectangleUpdateDecoder();
62 62
63 void AllocateFrame(const VideoPacket* packet, const base::Closure& done); 63 void AllocateFrame(const VideoPacket* packet, const base::Closure& done);
64 void ProcessPacketData(const VideoPacket* packet, const base::Closure& done); 64 void ProcessPacketData(const VideoPacket* packet, const base::Closure& done);
65 void RefreshRects(const RectVector& rects);
66 65
67 // Obtain updated rectangles from decoder and submit it to the consumer. 66 // Obtain updated rectangles from decoder and submit it to the consumer.
68 void SubmitToConsumer(); 67 void SubmitToConsumer();
69 68
70 // Use |refresh_rects_| to do a refresh to the backing video frame. 69 // Use |refresh_rects_| to do a refresh to the backing video frame.
71 // When done the affected rectangles are submitted to the consumer. 70 // When done the affected rectangles are submitted to the consumer.
72 void DoRefresh(); 71 void DoRefresh();
73 72
74 // Callback for FrameConsumer::OnPartialFrameOutput() 73 // Callback for FrameConsumer::OnPartialFrameOutput()
75 void OnFrameConsumed(RectVector* rects); 74 void OnFrameConsumed(RectVector* rects);
(...skipping 12 matching lines...) Expand all
88 scoped_refptr<media::VideoFrame> frame_; 87 scoped_refptr<media::VideoFrame> frame_;
89 bool frame_is_new_; 88 bool frame_is_new_;
90 89
91 // True if |consumer_| is currently using the frame. 90 // True if |consumer_| is currently using the frame.
92 bool frame_is_consuming_; 91 bool frame_is_consuming_;
93 }; 92 };
94 93
95 } // namespace remoting 94 } // namespace remoting
96 95
97 #endif // REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H_ 96 #endif // REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698