| 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 "SkBmpCodec.h" | 8 #include "SkBmpCodec.h" |
| 9 #include "SkBmpMaskCodec.h" | 9 #include "SkBmpMaskCodec.h" |
| 10 #include "SkBmpRLECodec.h" | 10 #include "SkBmpRLECodec.h" |
| 11 #include "SkBmpStandardCodec.h" | 11 #include "SkBmpStandardCodec.h" |
| 12 #include "SkCodecPriv.h" | 12 #include "SkCodecPriv.h" |
| 13 #include "SkColorPriv.h" | 13 #include "SkColorPriv.h" |
| 14 #include "SkScaledCodec.h" | |
| 15 #include "SkStream.h" | 14 #include "SkStream.h" |
| 16 | 15 |
| 17 /* | 16 /* |
| 18 * Defines the version and type of the second bitmap header | 17 * Defines the version and type of the second bitmap header |
| 19 */ | 18 */ |
| 20 enum BmpHeaderType { | 19 enum BmpHeaderType { |
| 21 kInfoV1_BmpHeaderType, | 20 kInfoV1_BmpHeaderType, |
| 22 kInfoV2_BmpHeaderType, | 21 kInfoV2_BmpHeaderType, |
| 23 kInfoV3_BmpHeaderType, | 22 kInfoV3_BmpHeaderType, |
| 24 kInfoV4_BmpHeaderType, | 23 kInfoV4_BmpHeaderType, |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 return prepareToDecode(dstInfo, options, inputColorPtr, inputColorCount); | 571 return prepareToDecode(dstInfo, options, inputColorPtr, inputColorCount); |
| 573 } | 572 } |
| 574 | 573 |
| 575 int SkBmpCodec::onGetScanlines(void* dst, int count, size_t rowBytes) { | 574 int SkBmpCodec::onGetScanlines(void* dst, int count, size_t rowBytes) { |
| 576 // Create a new image info representing the portion of the image to decode | 575 // Create a new image info representing the portion of the image to decode |
| 577 SkImageInfo rowInfo = this->dstInfo().makeWH(this->dstInfo().width(), count)
; | 576 SkImageInfo rowInfo = this->dstInfo().makeWH(this->dstInfo().width(), count)
; |
| 578 | 577 |
| 579 // Decode the requested rows | 578 // Decode the requested rows |
| 580 return this->decodeRows(rowInfo, dst, rowBytes, this->options()); | 579 return this->decodeRows(rowInfo, dst, rowBytes, this->options()); |
| 581 } | 580 } |
| OLD | NEW |