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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 static void ComputeSampleSize(const SkImageInfo& dstInfo, const SkImageInfo&
srcInfo, | 43 static void ComputeSampleSize(const SkImageInfo& dstInfo, const SkImageInfo&
srcInfo, |
44 int* sampleSizeX, int* sampleSizeY); | 44 int* sampleSizeX, int* sampleSizeY); |
45 | 45 |
46 protected: | 46 protected: |
47 /** | 47 /** |
48 * Recommend a set of destination dimensions given a requested scale | 48 * Recommend a set of destination dimensions given a requested scale |
49 */ | 49 */ |
50 SkISize onGetScaledDimensions(float desiredScale) const override; | 50 SkISize onGetScaledDimensions(float desiredScale) const override; |
51 | 51 |
52 Result onGetPixels(const SkImageInfo&, void*, size_t, const Options&, SkPMCo
lor*, int*) | 52 Result onGetPixels(const SkImageInfo&, void*, size_t, const Options&, SkPMCo
lor*, int*, int*) |
53 override; | 53 override; |
54 SkEncodedFormat onGetEncodedFormat() const override { | 54 SkEncodedFormat onGetEncodedFormat() const override { |
55 return fScanlineDecoder->getEncodedFormat(); | 55 return fScanlineDecoder->getEncodedFormat(); |
56 } | 56 } |
57 | 57 |
58 bool onReallyHasAlpha() const override { | 58 bool onReallyHasAlpha() const override { |
59 return fScanlineDecoder->reallyHasAlpha(); | 59 return fScanlineDecoder->reallyHasAlpha(); |
60 } | 60 } |
61 | 61 |
| 62 uint32_t onGetFillValue(const SkImageInfo& dstInfo) const override; |
| 63 |
| 64 void* onGetFillDst(void* dst, size_t dstRowBytes, uint32_t decodedScanlines)
const override; |
| 65 |
62 private: | 66 private: |
63 | 67 |
64 SkAutoTDelete<SkScanlineDecoder> fScanlineDecoder; | 68 SkAutoTDelete<SkScanlineDecoder> fScanlineDecoder; |
65 | 69 |
66 explicit SkScaledCodec(SkScanlineDecoder*); | 70 explicit SkScaledCodec(SkScanlineDecoder*); |
67 | 71 |
68 typedef SkCodec INHERITED; | 72 typedef SkCodec INHERITED; |
69 }; | 73 }; |
70 #endif // SkScaledCodec_DEFINED | 74 #endif // SkScaledCodec_DEFINED |
OLD | NEW |