| 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 #ifndef SkScanlineDecoder_DEFINED | 8 #ifndef SkScanlineDecoder_DEFINED |
| 9 #define SkScanlineDecoder_DEFINED | 9 #define SkScanlineDecoder_DEFINED |
| 10 | 10 |
| 11 #include "../private/SkTemplates.h" |
| 12 #include "SkCodec.h" |
| 13 #include "SkImageInfo.h" |
| 11 #include "SkTypes.h" | 14 #include "SkTypes.h" |
| 12 #include "SkCodec.h" | |
| 13 #include "SkTemplates.h" | |
| 14 #include "SkImageInfo.h" | |
| 15 | 15 |
| 16 class SkScanlineDecoder : public SkNoncopyable { | 16 class SkScanlineDecoder : public SkNoncopyable { |
| 17 public: | 17 public: |
| 18 /** | 18 /** |
| 19 * If this stream represents an encoded image that we know how to decode | 19 * If this stream represents an encoded image that we know how to decode |
| 20 * in scanlines, return an SkScanlineDecoder that can decode it. Otherwise | 20 * in scanlines, return an SkScanlineDecoder that can decode it. Otherwise |
| 21 * return NULL. | 21 * return NULL. |
| 22 * | 22 * |
| 23 * start() must be called in order to decode any scanlines. | 23 * start() must be called in order to decode any scanlines. |
| 24 * | 24 * |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 // Calling the virtual method also means we do not double count | 205 // Calling the virtual method also means we do not double count |
| 206 // countLines. | 206 // countLines. |
| 207 return this->onGetScanlines(storage.get(), countLines, 0); | 207 return this->onGetScanlines(storage.get(), countLines, 0); |
| 208 } | 208 } |
| 209 | 209 |
| 210 virtual SkCodec::Result onGetScanlines(void* dst, int countLines, | 210 virtual SkCodec::Result onGetScanlines(void* dst, int countLines, |
| 211 size_t rowBytes) = 0; | 211 size_t rowBytes) = 0; |
| 212 | 212 |
| 213 }; | 213 }; |
| 214 #endif // SkScanlineDecoder_DEFINED | 214 #endif // SkScanlineDecoder_DEFINED |
| OLD | NEW |