| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 // Calling the virtual method also means we do not double count | 163 // Calling the virtual method also means we do not double count |
| 164 // countLines. | 164 // countLines. |
| 165 return this->onGetScanlines(storage.get(), countLines, 0); | 165 return this->onGetScanlines(storage.get(), countLines, 0); |
| 166 } | 166 } |
| 167 | 167 |
| 168 virtual SkCodec::Result onGetScanlines(void* dst, int countLines, | 168 virtual SkCodec::Result onGetScanlines(void* dst, int countLines, |
| 169 size_t rowBytes) = 0; | 169 size_t rowBytes) = 0; |
| 170 | 170 |
| 171 }; | 171 }; |
| 172 #endif // SkScanlineDecoder_DEFINED | 172 #endif // SkScanlineDecoder_DEFINED |
| OLD | NEW |