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

Side by Side Diff: chrome/utility/cloud_print/pwg_encoder.cc

Issue 447233004: Fix accidental octal literal in pwg_encoder.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/big_endian.h" 9 #include "base/big_endian.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/utility/cloud_print/bitmap_image.h" 12 #include "chrome/utility/cloud_print/bitmap_image.h"
13 13
14 namespace cloud_print { 14 namespace cloud_print {
15 15
16 namespace { 16 namespace {
17 17
18 const uint32 kBitsPerColor = 8; 18 const uint32 kBitsPerColor = 8;
19 const uint32 kColorOrder = 0; // chunky. 19 const uint32 kColorOrder = 0; // chunky.
20 20
21 // Coefficients used to convert from RGB to monochrome. 21 // Coefficients used to convert from RGB to monochrome.
22 const uint32 kRedCoefficient = 2125; 22 const uint32 kRedCoefficient = 2125;
23 const uint32 kGreenCoefficient = 7154; 23 const uint32 kGreenCoefficient = 7154;
24 const uint32 kBlueCoefficient = 0721; 24 const uint32 kBlueCoefficient = 721;
25 const uint32 kColorCoefficientDenominator = 10000; 25 const uint32 kColorCoefficientDenominator = 10000;
26 26
27 const char* kPwgKeyword = "RaS2"; 27 const char* kPwgKeyword = "RaS2";
28 28
29 const uint32 kHeaderSize = 1796; 29 const uint32 kHeaderSize = 1796;
30 const uint32 kHeaderCupsDuplex = 272; 30 const uint32 kHeaderCupsDuplex = 272;
31 const uint32 kHeaderCupsHwResolutionHorizontal = 276; 31 const uint32 kHeaderCupsHwResolutionHorizontal = 276;
32 const uint32 kHeaderCupsHwResolutionVertical = 280; 32 const uint32 kHeaderCupsHwResolutionVertical = 280;
33 const uint32 kHeaderCupsTumble = 368; 33 const uint32 kHeaderCupsTumble = 368;
34 const uint32 kHeaderCupsWidth = 372; 34 const uint32 kHeaderCupsWidth = 372;
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 EncodeRow<InputStruct>(std::reverse_iterator<const uint32*>(row_end), 253 EncodeRow<InputStruct>(std::reverse_iterator<const uint32*>(row_end),
254 std::reverse_iterator<const uint32*>(pos), 254 std::reverse_iterator<const uint32*>(pos),
255 monochrome, 255 monochrome,
256 output); 256 output);
257 } 257 }
258 } 258 }
259 return true; 259 return true;
260 } 260 }
261 261
262 } // namespace cloud_print 262 } // namespace cloud_print
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698