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" |
(...skipping 22 matching lines...) Expand all Loading... |
33 /////////////////////////////////////////////////////////////////////////////// | 33 /////////////////////////////////////////////////////////////////////////////// |
34 | 34 |
35 SkImageDecoder::SkImageDecoder() | 35 SkImageDecoder::SkImageDecoder() |
36 : fPeeker(NULL) | 36 : fPeeker(NULL) |
37 , fChooser(NULL) | 37 , fChooser(NULL) |
38 , fAllocator(NULL) | 38 , fAllocator(NULL) |
39 , fSampleSize(1) | 39 , fSampleSize(1) |
40 , fDefaultPref(SkBitmap::kNo_Config) | 40 , fDefaultPref(SkBitmap::kNo_Config) |
41 , fDitherImage(true) | 41 , fDitherImage(true) |
42 , fUsePrefTable(false) | 42 , fUsePrefTable(false) |
43 , fPreferQualityOverSpeed(false) { | 43 , fPreferQualityOverSpeed(false) |
| 44 , fRequireUnpremultipliedColors(false) { |
44 } | 45 } |
45 | 46 |
46 SkImageDecoder::~SkImageDecoder() { | 47 SkImageDecoder::~SkImageDecoder() { |
47 SkSafeUnref(fPeeker); | 48 SkSafeUnref(fPeeker); |
48 SkSafeUnref(fChooser); | 49 SkSafeUnref(fChooser); |
49 SkSafeUnref(fAllocator); | 50 SkSafeUnref(fAllocator); |
50 } | 51 } |
51 | 52 |
52 SkImageDecoder::Format SkImageDecoder::getFormat() const { | 53 SkImageDecoder::Format SkImageDecoder::getFormat() const { |
53 return kUnknown_Format; | 54 return kUnknown_Format; |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 if (kUnknown_Format == *format) { | 444 if (kUnknown_Format == *format) { |
444 if (stream->rewind()) { | 445 if (stream->rewind()) { |
445 *format = GetStreamFormat(stream); | 446 *format = GetStreamFormat(stream); |
446 } | 447 } |
447 } | 448 } |
448 } | 449 } |
449 delete codec; | 450 delete codec; |
450 } | 451 } |
451 return success; | 452 return success; |
452 } | 453 } |
OLD | NEW |