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

Side by Side Diff: remoting/base/decompressor_verbatim.cc

Issue 3305001: Move decoder into separate thread, clean up API layering, and redo update protocl (Closed)
Patch Set: Fix compile error. Created 10 years, 2 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/base/decompressor_verbatim.h ('k') | remoting/base/decompressor_zlib.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "remoting/base/decompressor_verbatim.h"
6
7 #include "base/logging.h"
8
9 namespace remoting {
10
11 DecompressorVerbatim::DecompressorVerbatim() {
12 }
13
14 DecompressorVerbatim::~DecompressorVerbatim() {
15 }
16
17 void DecompressorVerbatim::Reset() {
18 }
19
20 bool DecompressorVerbatim::Process(const uint8* input_data, int input_size,
21 uint8* output_data, int output_size,
22 int* consumed, int* written) {
23 DCHECK_GT(output_size, 0);
24 int bytes_to_copy = std::min(input_size, output_size);
25 memcpy(output_data, input_data, bytes_to_copy);
26
27 // Since we're just a memcpy, consumed and written are the same.
28 *consumed = *written = bytes_to_copy;
29 return true;
30 }
31 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/base/decompressor_verbatim.h ('k') | remoting/base/decompressor_zlib.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698