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/bitmap_image.h" | 5 #include "chrome/utility/cloud_print/bitmap_image.h" |
6 | 6 |
7 namespace printing { | 7 namespace cloud_print { |
8 | 8 |
9 namespace { | 9 namespace { |
10 const uint8 kCurrentlySupportedNumberOfChannels = 4; | 10 const uint8 kCurrentlySupportedNumberOfChannels = 4; |
11 } | 11 } |
12 | 12 |
13 BitmapImage::BitmapImage(int32 width, | 13 BitmapImage::BitmapImage(int32 width, |
14 int32 height, | 14 int32 height, |
15 Colorspace colorspace) | 15 Colorspace colorspace) |
16 : width_(width), | 16 : width_(width), |
17 height_(height), | 17 height_(height), |
18 colorspace_(colorspace), | 18 colorspace_(colorspace), |
19 data_(new uint8[width * height * channels()]) { | 19 data_(new uint8[width * height * channels()]) { |
20 } | 20 } |
21 | 21 |
22 BitmapImage::~BitmapImage() { | 22 BitmapImage::~BitmapImage() { |
23 } | 23 } |
24 | 24 |
25 uint8 BitmapImage::channels() const { | 25 uint8 BitmapImage::channels() const { |
26 return kCurrentlySupportedNumberOfChannels; | 26 return kCurrentlySupportedNumberOfChannels; |
27 } | 27 } |
28 | 28 |
29 } // namespace printing | 29 } // namespace cloud_print |
OLD | NEW |