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