| 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 #ifndef SkScaledCodec_DEFINED | 7 #ifndef SkScaledCodec_DEFINED |
| 8 #define SkScaledCodec_DEFINED | 8 #define SkScaledCodec_DEFINED |
| 9 | 9 |
| 10 #include "SkCodec.h" | 10 #include "SkCodec.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 protected: | 28 protected: |
| 29 bool onRewind() override; | 29 bool onRewind() override; |
| 30 | 30 |
| 31 /** | 31 /** |
| 32 * Recommend a set of destination dimensions given a requested scale | 32 * Recommend a set of destination dimensions given a requested scale |
| 33 */ | 33 */ |
| 34 SkISize onGetScaledDimensions(float desiredScale) const override; | 34 SkISize onGetScaledDimensions(float desiredScale) const override; |
| 35 bool onDimensionsSupported(const SkISize&) override; | 35 bool onDimensionsSupported(const SkISize&) override; |
| 36 | 36 |
| 37 Result onGetPixels(const SkImageInfo&, void*, size_t, const Options&, SkPMCo
lor*, int*) | 37 Result onGetPixels(const SkImageInfo&, void*, size_t, const Options&, SkPMCo
lor*, int*, int*) |
| 38 override; | 38 override; |
| 39 SkEncodedFormat onGetEncodedFormat() const override { | 39 SkEncodedFormat onGetEncodedFormat() const override { |
| 40 return fCodec->getEncodedFormat(); | 40 return fCodec->getEncodedFormat(); |
| 41 } | 41 } |
| 42 | 42 |
| 43 bool onReallyHasAlpha() const override { | 43 bool onReallyHasAlpha() const override { |
| 44 return fCodec->reallyHasAlpha(); | 44 return fCodec->reallyHasAlpha(); |
| 45 } | 45 } |
| 46 | 46 |
| 47 uint32_t onGetFillValue(SkColorType colorType, SkAlphaType alphaType) const
override; |
| 48 |
| 49 SkScanlineOrder onGetScanlineOrder() const override; |
| 50 |
| 47 private: | 51 private: |
| 48 | 52 |
| 49 SkAutoTDelete<SkCodec> fCodec; | 53 SkAutoTDelete<SkCodec> fCodec; |
| 50 | 54 |
| 51 explicit SkScaledCodec(SkCodec*); | 55 explicit SkScaledCodec(SkCodec*); |
| 52 | 56 |
| 53 typedef SkCodec INHERITED; | 57 typedef SkCodec INHERITED; |
| 54 }; | 58 }; |
| 55 #endif // SkScaledCodec_DEFINED | 59 #endif // SkScaledCodec_DEFINED |
| OLD | NEW |