Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: src/images/SkImageDecoder.cpp

Issue 1040453002: Add SkPngChunkReader. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update SkImageDecoder_empty Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/codec/SkCodec_libpng.cpp ('k') | src/images/SkImageDecoder_libpng.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 SkPngChunkReader* SkImageDecoder::setPeeker(SkPngChunkReader* 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 return success; 195 return success;
196 } 196 }
197 197
198 bool SkImageDecoder::decodeYUV8Planes(SkStream* stream, SkISize componentSizes[3 ], void* planes[3], 198 bool SkImageDecoder::decodeYUV8Planes(SkStream* stream, SkISize componentSizes[3 ], void* planes[3],
199 size_t rowBytes[3], SkYUVColorSpace* color Space) { 199 size_t rowBytes[3], SkYUVColorSpace* color Space) {
200 // we reset this to false before calling onDecodeYUV8Planes 200 // we reset this to false before calling onDecodeYUV8Planes
201 fShouldCancelDecode = false; 201 fShouldCancelDecode = false;
202 202
203 return this->onDecodeYUV8Planes(stream, componentSizes, planes, rowBytes, co lorSpace); 203 return this->onDecodeYUV8Planes(stream, componentSizes, planes, rowBytes, co lorSpace);
204 } 204 }
OLDNEW
« no previous file with comments | « src/codec/SkCodec_libpng.cpp ('k') | src/images/SkImageDecoder_libpng.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698