OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkBmpRLECodec.h" | 8 #include "SkBmpRLECodec.h" |
9 #include "SkCodecPriv.h" | 9 #include "SkCodecPriv.h" |
10 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
11 #include "SkScaledCodec.h" | |
12 #include "SkStream.h" | 11 #include "SkStream.h" |
13 | 12 |
14 /* | 13 /* |
15 * Creates an instance of the decoder | 14 * Creates an instance of the decoder |
16 * Called only by NewFromStream | 15 * Called only by NewFromStream |
17 */ | 16 */ |
18 SkBmpRLECodec::SkBmpRLECodec(const SkImageInfo& info, SkStream* stream, | 17 SkBmpRLECodec::SkBmpRLECodec(const SkImageInfo& info, SkStream* stream, |
19 uint16_t bitsPerPixel, uint32_t numColors, | 18 uint16_t bitsPerPixel, uint32_t numColors, |
20 uint32_t bytesPerColor, uint32_t offset, | 19 uint32_t bytesPerColor, uint32_t offset, |
21 SkCodec::SkScanlineOrder rowOrder, | 20 SkCodec::SkScanlineOrder rowOrder, |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 fSampler.reset(new SkBmpRLESampler(this)); | 505 fSampler.reset(new SkBmpRLESampler(this)); |
507 } | 506 } |
508 | 507 |
509 return fSampler; | 508 return fSampler; |
510 } | 509 } |
511 | 510 |
512 int SkBmpRLECodec::setSampleX(int sampleX){ | 511 int SkBmpRLECodec::setSampleX(int sampleX){ |
513 fSampleX = sampleX; | 512 fSampleX = sampleX; |
514 return get_scaled_dimension(this->getInfo().width(), sampleX); | 513 return get_scaled_dimension(this->getInfo().width(), sampleX); |
515 } | 514 } |
OLD | NEW |