OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
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 | 8 |
9 #include "SkImageDecoder.h" | 9 #include "SkImageDecoder.h" |
10 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
11 #include "SkImagePriv.h" | 11 #include "SkImagePriv.h" |
12 #include "SkPixelRef.h" | 12 #include "SkPixelRef.h" |
13 #include "SkStream.h" | 13 #include "SkStream.h" |
14 #include "SkTemplates.h" | 14 #include "SkTemplates.h" |
15 #include "SkCanvas.h" | 15 #include "SkCanvas.h" |
16 | 16 |
17 SK_DEFINE_INST_COUNT(SkImageDecoder::Peeker) | |
18 SK_DEFINE_INST_COUNT(SkImageDecoder::Chooser) | |
19 SK_DEFINE_INST_COUNT(SkImageDecoderFactory) | |
20 | |
21 static SkBitmap::Config gDeviceConfig = SkBitmap::kNo_Config; | 17 static SkBitmap::Config gDeviceConfig = SkBitmap::kNo_Config; |
22 | 18 |
23 SkBitmap::Config SkImageDecoder::GetDeviceConfig() | 19 SkBitmap::Config SkImageDecoder::GetDeviceConfig() |
24 { | 20 { |
25 return gDeviceConfig; | 21 return gDeviceConfig; |
26 } | 22 } |
27 | 23 |
28 void SkImageDecoder::SetDeviceConfig(SkBitmap::Config config) | 24 void SkImageDecoder::SetDeviceConfig(SkBitmap::Config config) |
29 { | 25 { |
30 gDeviceConfig = config; | 26 gDeviceConfig = config; |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 if (kUnknown_Format == *format) { | 458 if (kUnknown_Format == *format) { |
463 if (stream->rewind()) { | 459 if (stream->rewind()) { |
464 *format = GetStreamFormat(stream); | 460 *format = GetStreamFormat(stream); |
465 } | 461 } |
466 } | 462 } |
467 } | 463 } |
468 delete codec; | 464 delete codec; |
469 } | 465 } |
470 return success; | 466 return success; |
471 } | 467 } |
OLD | NEW |