OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/utility/cloud_print/pwg_encoder.h" | 5 #include "chrome/utility/cloud_print/pwg_encoder.h" |
6 | 6 |
7 #include <limits.h> | 7 #include <limits.h> |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
| 11 #include <memory> |
11 | 12 |
12 #include "base/big_endian.h" | 13 #include "base/big_endian.h" |
13 #include "base/logging.h" | 14 #include "base/logging.h" |
14 #include "base/memory/scoped_ptr.h" | |
15 #include "chrome/utility/cloud_print/bitmap_image.h" | 15 #include "chrome/utility/cloud_print/bitmap_image.h" |
16 | 16 |
17 namespace cloud_print { | 17 namespace cloud_print { |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 const uint32_t kBitsPerColor = 8; | 21 const uint32_t kBitsPerColor = 8; |
22 const uint32_t kColorOrder = 0; // chunky. | 22 const uint32_t kColorOrder = 0; // chunky. |
23 | 23 |
24 // Coefficients used to convert from RGB to monochrome. | 24 // Coefficients used to convert from RGB to monochrome. |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 // We reverse the iterators. | 258 // We reverse the iterators. |
259 EncodeRow<InputStruct>(std::reverse_iterator<const uint32_t*>(row_end), | 259 EncodeRow<InputStruct>(std::reverse_iterator<const uint32_t*>(row_end), |
260 std::reverse_iterator<const uint32_t*>(pos), | 260 std::reverse_iterator<const uint32_t*>(pos), |
261 monochrome, output); | 261 monochrome, output); |
262 } | 262 } |
263 } | 263 } |
264 return true; | 264 return true; |
265 } | 265 } |
266 | 266 |
267 } // namespace cloud_print | 267 } // namespace cloud_print |
OLD | NEW |