OLD | NEW |
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 "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 void ProcessPacketData(const VideoPacket* packet, const base::Closure& done); | 64 void ProcessPacketData(const VideoPacket* packet, const base::Closure& done); |
65 | 65 |
66 // Obtain updated rectangles from decoder and submit it to the consumer. | 66 // Obtain updated rectangles from decoder and submit it to the consumer. |
67 void SubmitToConsumer(); | 67 void SubmitToConsumer(); |
68 | 68 |
69 // 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. |
70 // When done the affected rectangles are submitted to the consumer. | 70 // When done the affected rectangles are submitted to the consumer. |
71 void DoRefresh(); | 71 void DoRefresh(); |
72 | 72 |
73 // Callback for FrameConsumer::OnPartialFrameOutput() | 73 // Callback for FrameConsumer::OnPartialFrameOutput() |
74 void OnFrameConsumed(SkRegion* region); | 74 void OnFrameConsumed(RectVector* rects); |
75 | 75 |
76 scoped_refptr<base::MessageLoopProxy> message_loop_; | 76 scoped_refptr<base::MessageLoopProxy> message_loop_; |
77 FrameConsumer* consumer_; | 77 FrameConsumer* consumer_; |
78 | 78 |
79 SkISize screen_size_; | 79 SkISize screen_size_; |
80 SkIRect clip_rect_; | 80 SkIRect clip_rect_; |
81 SkRegion refresh_region_; | 81 RectVector refresh_rects_; |
82 | 82 |
83 scoped_ptr<Decoder> decoder_; | 83 scoped_ptr<Decoder> decoder_; |
84 bool decoder_needs_reset_; | 84 bool decoder_needs_reset_; |
85 | 85 |
86 // The video frame that the decoder writes to. | 86 // The video frame that the decoder writes to. |
87 scoped_refptr<media::VideoFrame> frame_; | 87 scoped_refptr<media::VideoFrame> frame_; |
88 }; | 88 }; |
89 | 89 |
90 } // namespace remoting | 90 } // namespace remoting |
91 | 91 |
92 #endif // REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H_ | 92 #endif // REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H_ |
OLD | NEW |