| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "remoting/base/encoder_zlib.h" | 5 #include "remoting/base/encoder_zlib.h" |
| 6 | 6 |
| 7 #include "base/logging.h" |
| 7 #include "gfx/rect.h" | 8 #include "gfx/rect.h" |
| 8 #include "media/base/data_buffer.h" | 9 #include "media/base/data_buffer.h" |
| 9 #include "remoting/base/capture_data.h" | 10 #include "remoting/base/capture_data.h" |
| 10 #include "remoting/base/compressor_zlib.h" | 11 #include "remoting/base/compressor_zlib.h" |
| 11 #include "remoting/base/protocol_util.h" | 12 #include "remoting/base/protocol_util.h" |
| 12 #include "remoting/base/protocol/chromotocol.pb.h" | 13 #include "remoting/base/protocol/chromotocol.pb.h" |
| 13 | 14 |
| 14 namespace remoting { | 15 namespace remoting { |
| 15 | 16 |
| 16 static const int kPacketSize = 1024 * 1024; | 17 static const int kPacketSize = 1024 * 1024; |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 EncodingState state = EncodingInProgress; | 132 EncodingState state = EncodingInProgress; |
| 132 if (rect_index == 0 && message->update_stream_packet().has_begin_rect()) | 133 if (rect_index == 0 && message->update_stream_packet().has_begin_rect()) |
| 133 state |= EncodingStarting; | 134 state |= EncodingStarting; |
| 134 if (rect_index == capture_data_->dirty_rects().size() - 1 && | 135 if (rect_index == capture_data_->dirty_rects().size() - 1 && |
| 135 message->update_stream_packet().has_end_rect()) | 136 message->update_stream_packet().has_end_rect()) |
| 136 state |= EncodingEnded; | 137 state |= EncodingEnded; |
| 137 callback_->Run(message, state); | 138 callback_->Run(message, state); |
| 138 } | 139 } |
| 139 | 140 |
| 140 } // namespace remoting | 141 } // namespace remoting |
| OLD | NEW |