| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 #ifndef SkScaledBitmapSampler_DEFINED | 8 #ifndef SkScaledBitmapSampler_DEFINED |
| 9 #define SkScaledBitmapSampler_DEFINED | 9 #define SkScaledBitmapSampler_DEFINED |
| 10 | 10 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 : fDither(dec.getDitherImage()) | 42 : fDither(dec.getDitherImage()) |
| 43 , fPremultiplyAlpha(!dec.getRequireUnpremultipliedColors()) | 43 , fPremultiplyAlpha(!dec.getRequireUnpremultipliedColors()) |
| 44 , fSkipZeros(dec.getSkipWritingZeroes()) | 44 , fSkipZeros(dec.getSkipWritingZeroes()) |
| 45 { } | 45 { } |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 // Given a dst bitmap (with pixels already allocated) and a src-config, | 48 // Given a dst bitmap (with pixels already allocated) and a src-config, |
| 49 // prepares iterator to process the src colors and write them into dst. | 49 // prepares iterator to process the src colors and write them into dst. |
| 50 // Returns false if the request cannot be fulfulled. | 50 // Returns false if the request cannot be fulfulled. |
| 51 bool begin(SkBitmap* dst, SrcConfig sc, const SkImageDecoder& decoder, | 51 bool begin(SkBitmap* dst, SrcConfig sc, const SkImageDecoder& decoder, |
| 52 const SkPMColor* = NULL); | 52 const SkPMColor* = nullptr); |
| 53 bool begin(SkBitmap* dst, SrcConfig sc, const Options& opts, | 53 bool begin(SkBitmap* dst, SrcConfig sc, const Options& opts, |
| 54 const SkPMColor* = NULL); | 54 const SkPMColor* = nullptr); |
| 55 // call with row of src pixels, for y = 0...scaledHeight-1. | 55 // call with row of src pixels, for y = 0...scaledHeight-1. |
| 56 // returns true if the row had non-opaque alpha in it | 56 // returns true if the row had non-opaque alpha in it |
| 57 bool next(const uint8_t* SK_RESTRICT src); | 57 bool next(const uint8_t* SK_RESTRICT src); |
| 58 | 58 |
| 59 // Like next(), but specifies the y value of the source row, so the | 59 // Like next(), but specifies the y value of the source row, so the |
| 60 // rows can come in any order. If the row is not part of the output | 60 // rows can come in any order. If the row is not part of the output |
| 61 // sample, it will be skipped. Only sampleInterlaced OR next should | 61 // sample, it will be skipped. Only sampleInterlaced OR next should |
| 62 // be called for one SkScaledBitmapSampler. | 62 // be called for one SkScaledBitmapSampler. |
| 63 bool sampleInterlaced(const uint8_t* SK_RESTRICT src, int srcY); | 63 bool sampleInterlaced(const uint8_t* SK_RESTRICT src, int srcY); |
| 64 | 64 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 // optional reference to the src colors if the src is a palette model | 98 // optional reference to the src colors if the src is a palette model |
| 99 const SkPMColor* fCTable; | 99 const SkPMColor* fCTable; |
| 100 | 100 |
| 101 #ifdef SK_DEBUG | 101 #ifdef SK_DEBUG |
| 102 // Helper class allowing a test to have access to fRowProc. | 102 // Helper class allowing a test to have access to fRowProc. |
| 103 friend class RowProcTester; | 103 friend class RowProcTester; |
| 104 #endif | 104 #endif |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 #endif | 107 #endif |
| OLD | NEW |