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 "SkCodec.h" | 9 #include "SkCodec.h" |
| 10 #include "SkCodec_libpng.h" |
| 11 #include "SkCodecPriv.h" |
10 #include "SkData.h" | 12 #include "SkData.h" |
11 #include "SkCodec_libgif.h" | 13 #include "SkGifCodec.h" |
12 #include "SkCodec_libico.h" | 14 #include "SkIcoCodec.h" |
13 #include "SkCodec_libpng.h" | |
14 #include "SkCodec_wbmp.h" | |
15 #include "SkCodecPriv.h" | |
16 #if !defined(GOOGLE3) | 15 #if !defined(GOOGLE3) |
17 #include "SkJpegCodec.h" | 16 #include "SkJpegCodec.h" |
18 #endif | 17 #endif |
19 #include "SkStream.h" | 18 #include "SkStream.h" |
| 19 #include "SkWbmpCodec.h" |
20 #include "SkWebpCodec.h" | 20 #include "SkWebpCodec.h" |
21 | 21 |
22 struct DecoderProc { | 22 struct DecoderProc { |
23 bool (*IsFormat)(const void*, size_t); | 23 bool (*IsFormat)(const void*, size_t); |
24 SkCodec* (*NewFromStream)(SkStream*); | 24 SkCodec* (*NewFromStream)(SkStream*); |
25 }; | 25 }; |
26 | 26 |
27 static const DecoderProc gDecoderProcs[] = { | 27 static const DecoderProc gDecoderProcs[] = { |
28 #if !defined(GOOGLE3) | 28 #if !defined(GOOGLE3) |
29 { SkJpegCodec::IsJpeg, SkJpegCodec::NewFromStream }, | 29 { SkJpegCodec::IsJpeg, SkJpegCodec::NewFromStream }, |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 SkASSERT(1 == linesRequested || this->getInfo().height() == linesReq
uested); | 377 SkASSERT(1 == linesRequested || this->getInfo().height() == linesReq
uested); |
378 const SkImageInfo fillInfo = info.makeWH(info.width(), 1); | 378 const SkImageInfo fillInfo = info.makeWH(info.width(), 1); |
379 for (int srcY = linesDecoded; srcY < linesRequested; srcY++) { | 379 for (int srcY = linesDecoded; srcY < linesRequested; srcY++) { |
380 fillDst = SkTAddOffset<void>(dst, this->outputScanline(srcY) * r
owBytes); | 380 fillDst = SkTAddOffset<void>(dst, this->outputScanline(srcY) * r
owBytes); |
381 fill_proc(fillInfo, fillDst, rowBytes, fillValue, zeroInit, samp
ler); | 381 fill_proc(fillInfo, fillDst, rowBytes, fillValue, zeroInit, samp
ler); |
382 } | 382 } |
383 break; | 383 break; |
384 } | 384 } |
385 } | 385 } |
386 } | 386 } |
OLD | NEW |