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

Side by Side Diff: remoting/host/encoder_verbatim.cc

Issue 2829018: Fix thread usage in chromoting host (Closed)
Patch Set: removed useless test Created 10 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
« no previous file with comments | « remoting/host/client_connection_unittest.cc ('k') | remoting/host/session_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/host/encoder_verbatim.h" 5 #include "remoting/host/encoder_verbatim.h"
6 6
7 #include "gfx/rect.h" 7 #include "gfx/rect.h"
8 #include "media/base/data_buffer.h" 8 #include "media/base/data_buffer.h"
9 #include "remoting/base/protocol_util.h" 9 #include "remoting/base/protocol_util.h"
10 10
(...skipping 12 matching lines...) Expand all
23 gfx::Rect dirty_rect = dirty_rects[i]; 23 gfx::Rect dirty_rect = dirty_rects[i];
24 scoped_ptr<UpdateStreamPacketHeader> header(new UpdateStreamPacketHeader); 24 scoped_ptr<UpdateStreamPacketHeader> header(new UpdateStreamPacketHeader);
25 if (EncodeRect(dirty_rect, 25 if (EncodeRect(dirty_rect,
26 input_data, 26 input_data,
27 strides, 27 strides,
28 header.get(), 28 header.get(),
29 &data)) { 29 &data)) {
30 EncodingState state = EncodingInProgress; 30 EncodingState state = EncodingInProgress;
31 if (i == 0) { 31 if (i == 0) {
32 state |= EncodingStarting; 32 state |= EncodingStarting;
33 } else if (i == num_rects - 1) { 33 }
34 if (i == num_rects - 1) {
34 state |= EncodingEnded; 35 state |= EncodingEnded;
35 } 36 }
36 data_available_callback->Run(header.release(), 37 data_available_callback->Run(header.release(),
37 data, 38 data,
38 state); 39 state);
39 } 40 }
40 } 41 }
41 42
42 delete data_available_callback; 43 delete data_available_callback;
43 } 44 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 DCHECK_LE(row_size, strides[i]); 89 DCHECK_LE(row_size, strides[i]);
89 memcpy(out, in, row_size); 90 memcpy(out, in, row_size);
90 in += strides[i]; 91 in += strides[i];
91 out += row_size; 92 out += row_size;
92 } 93 }
93 } 94 }
94 return true; 95 return true;
95 } 96 }
96 97
97 } // namespace remoting 98 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/client_connection_unittest.cc ('k') | remoting/host/session_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698