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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 case kWBMP_Format: | 76 case kWBMP_Format: |
77 return "WBMP"; | 77 return "WBMP"; |
78 case kWEBP_Format: | 78 case kWEBP_Format: |
79 return "WEBP"; | 79 return "WEBP"; |
80 default: | 80 default: |
81 SkDEBUGFAIL("Invalid format type!"); | 81 SkDEBUGFAIL("Invalid format type!"); |
82 } | 82 } |
83 return "Unknown Format"; | 83 return "Unknown Format"; |
84 } | 84 } |
85 | 85 |
86 SkImageDecoder::Peeker* SkImageDecoder::setPeeker(Peeker* peeker) { | 86 SkChunkReader* SkImageDecoder::setPeeker(SkChunkReader* peeker) { |
87 SkRefCnt_SafeAssign(fPeeker, peeker); | 87 SkRefCnt_SafeAssign(fPeeker, peeker); |
88 return peeker; | 88 return peeker; |
89 } | 89 } |
90 | 90 |
91 SkBitmap::Allocator* SkImageDecoder::setAllocator(SkBitmap::Allocator* alloc) { | 91 SkBitmap::Allocator* SkImageDecoder::setAllocator(SkBitmap::Allocator* alloc) { |
92 SkRefCnt_SafeAssign(fAllocator, alloc); | 92 SkRefCnt_SafeAssign(fAllocator, alloc); |
93 return alloc; | 93 return alloc; |
94 } | 94 } |
95 | 95 |
96 void SkImageDecoder::setSampleSize(int size) { | 96 void SkImageDecoder::setSampleSize(int size) { |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 return success; | 265 return success; |
266 } | 266 } |
267 | 267 |
268 bool SkImageDecoder::decodeYUV8Planes(SkStream* stream, SkISize componentSizes[3
], void* planes[3], | 268 bool SkImageDecoder::decodeYUV8Planes(SkStream* stream, SkISize componentSizes[3
], void* planes[3], |
269 size_t rowBytes[3], SkYUVColorSpace* color
Space) { | 269 size_t rowBytes[3], SkYUVColorSpace* color
Space) { |
270 // we reset this to false before calling onDecodeYUV8Planes | 270 // we reset this to false before calling onDecodeYUV8Planes |
271 fShouldCancelDecode = false; | 271 fShouldCancelDecode = false; |
272 | 272 |
273 return this->onDecodeYUV8Planes(stream, componentSizes, planes, rowBytes, co
lorSpace); | 273 return this->onDecodeYUV8Planes(stream, componentSizes, planes, rowBytes, co
lorSpace); |
274 } | 274 } |
OLD | NEW |