| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2007 The Android Open Source Project | 3 * Copyright 2007 The Android Open Source Project |
| 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 | 8 |
| 9 | 9 |
| 10 #ifndef SkBitmapProcState_DEFINED | 10 #ifndef SkBitmapProcState_DEFINED |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 typedef void (*SampleProc32)(const SkBitmapProcState&, | 53 typedef void (*SampleProc32)(const SkBitmapProcState&, |
| 54 const uint32_t[], | 54 const uint32_t[], |
| 55 int count, | 55 int count, |
| 56 SkPMColor colors[]); | 56 SkPMColor colors[]); |
| 57 | 57 |
| 58 typedef void (*SampleProc16)(const SkBitmapProcState&, | 58 typedef void (*SampleProc16)(const SkBitmapProcState&, |
| 59 const uint32_t[], | 59 const uint32_t[], |
| 60 int count, | 60 int count, |
| 61 uint16_t colors[]); | 61 uint16_t colors[]); |
| 62 | 62 |
| 63 typedef U16CPU (*FixedTileProc)(SkFixed); // returns 0..0xFFFF | 63 typedef U16CPU (*FixedTileProc)(SkFixed); // returns 0..0xFFFF |
| 64 typedef U16CPU (*FixedTileLowBitsProc)(SkFixed, int); // returns 0..0xF | 64 typedef U16CPU (*FixedTileLowBitsProc)(SkFixed, int); // returns 0..0xF |
| 65 typedef U16CPU (*IntTileProc)(int value, int count); // returns 0..count-1 | 65 typedef U16CPU (*IntTileProc)(int value, int count); // returns 0..count-1 |
| 66 | 66 |
| 67 const SkBitmap* fBitmap; // chooseProcs - orig or scaled | 67 const SkBitmap* fBitmap; // chooseProcs - orig or scaled |
| 68 SkMatrix fInvMatrix; // chooseProcs | 68 SkMatrix fInvMatrix; // chooseProcs |
| 69 SkMatrix::MapXYProc fInvProc; // chooseProcs | 69 SkMatrix::MapXYProc fInvProc; // chooseProcs |
| 70 | 70 |
| 71 SkFractionalInt fInvSxFractionalInt; | 71 SkFractionalInt fInvSxFractionalInt; |
| 72 SkFractionalInt fInvKyFractionalInt; | 72 SkFractionalInt fInvKyFractionalInt; |
| 73 | 73 |
| 74 FixedTileProc fTileProcX; // chooseProcs | 74 FixedTileProc fTileProcX; // chooseProcs |
| 75 FixedTileProc fTileProcY; // chooseProcs | 75 FixedTileProc fTileProcY; // chooseProcs |
| 76 FixedTileLowBitsProc fTileLowBitsProcX; // chooseProcs | 76 FixedTileLowBitsProc fTileLowBitsProcX; // chooseProcs |
| 77 FixedTileLowBitsProc fTileLowBitsProcY; // chooseProcs | 77 FixedTileLowBitsProc fTileLowBitsProcY; // chooseProcs |
| 78 IntTileProc fIntTileProcY; // chooseProcs | 78 IntTileProc fIntTileProcY; // chooseProcs |
| 79 SkFixed fFilterOneX; | 79 SkFixed fFilterOneX; |
| 80 SkFixed fFilterOneY; | 80 SkFixed fFilterOneY; |
| 81 |
| 82 SkConvolutionProcs* fConvolutionProcs; // possiblyScaleImage |
| 81 | 83 |
| 82 SkPMColor fPaintPMColor; // chooseProcs - A8 config | 84 SkPMColor fPaintPMColor; // chooseProcs - A8 config |
| 83 SkFixed fInvSx; // chooseProcs | 85 SkFixed fInvSx; // chooseProcs |
| 84 SkFixed fInvKy; // chooseProcs | 86 SkFixed fInvKy; // chooseProcs |
| 85 uint16_t fAlphaScale; // chooseProcs | 87 uint16_t fAlphaScale; // chooseProcs |
| 86 uint8_t fInvType; // chooseProcs | 88 uint8_t fInvType; // chooseProcs |
| 87 uint8_t fTileModeX; // CONSTRUCTOR | 89 uint8_t fTileModeX; // CONSTRUCTOR |
| 88 uint8_t fTileModeY; // CONSTRUCTOR | 90 uint8_t fTileModeY; // CONSTRUCTOR |
| 89 | 91 |
| 90 enum { | 92 enum { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 106 fShaderProc16 | 108 fShaderProc16 |
| 107 fMatrixProc | 109 fMatrixProc |
| 108 fSampleProc32 | 110 fSampleProc32 |
| 109 fSampleProc32 | 111 fSampleProc32 |
| 110 | 112 |
| 111 They will already have valid function pointers, so a platform that does | 113 They will already have valid function pointers, so a platform that does |
| 112 not have an accelerated version can just leave that field as is. A valid | 114 not have an accelerated version can just leave that field as is. A valid |
| 113 implementation can do nothing (see SkBitmapProcState_opts_none.cpp) | 115 implementation can do nothing (see SkBitmapProcState_opts_none.cpp) |
| 114 */ | 116 */ |
| 115 void platformProcs(); | 117 void platformProcs(); |
| 116 | 118 |
| 119 /** Platforms can also optionally overwrite the convolution functions |
| 120 if we have SIMD versions of them. |
| 121 */ |
| 122 |
| 123 void platformConvolutionProcs(); |
| 117 | 124 |
| 118 /** Given the byte size of the index buffer to be passed to the matrix proc, | 125 /** Given the byte size of the index buffer to be passed to the matrix proc, |
| 119 return the maximum number of resulting pixels that can be computed | 126 return the maximum number of resulting pixels that can be computed |
| 120 (i.e. the number of SkPMColor values to be written by the sample proc). | 127 (i.e. the number of SkPMColor values to be written by the sample proc). |
| 121 This routine takes into account that filtering and scale-vs-affine | 128 This routine takes into account that filtering and scale-vs-affine |
| 122 affect the amount of buffer space needed. | 129 affect the amount of buffer space needed. |
| 123 | 130 |
| 124 Only valid to call after chooseProcs (setContext) has been called. It is | 131 Only valid to call after chooseProcs (setContext) has been called. It is |
| 125 safe to call this inside the shader's shadeSpan() method. | 132 safe to call this inside the shader's shadeSpan() method. |
| 126 */ | 133 */ |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 int count, int x, int y); | 218 int count, int x, int y); |
| 212 void ClampX_ClampY_nofilter_scale(const SkBitmapProcState& s, uint32_t xy[], | 219 void ClampX_ClampY_nofilter_scale(const SkBitmapProcState& s, uint32_t xy[], |
| 213 int count, int x, int y); | 220 int count, int x, int y); |
| 214 void ClampX_ClampY_filter_affine(const SkBitmapProcState& s, | 221 void ClampX_ClampY_filter_affine(const SkBitmapProcState& s, |
| 215 uint32_t xy[], int count, int x, int y); | 222 uint32_t xy[], int count, int x, int y); |
| 216 void ClampX_ClampY_nofilter_affine(const SkBitmapProcState& s, | 223 void ClampX_ClampY_nofilter_affine(const SkBitmapProcState& s, |
| 217 uint32_t xy[], int count, int x, int y); | 224 uint32_t xy[], int count, int x, int y); |
| 218 void S32_D16_filter_DX(const SkBitmapProcState& s, | 225 void S32_D16_filter_DX(const SkBitmapProcState& s, |
| 219 const uint32_t* xy, int count, uint16_t* colo
rs); | 226 const uint32_t* xy, int count, uint16_t* colo
rs); |
| 220 | 227 |
| 221 void highQualityFilter_ScaleOnly(const SkBitmapProcState &s, int x, int y, | |
| 222 SkPMColor *SK_RESTRICT colors, int count); | |
| 223 void highQualityFilter(const SkBitmapProcState &s, int x, int y, | 228 void highQualityFilter(const SkBitmapProcState &s, int x, int y, |
| 224 SkPMColor *SK_RESTRICT colors, int count); | 229 SkPMColor *SK_RESTRICT colors, int count); |
| 225 | 230 |
| 226 | 231 |
| 227 #endif | 232 #endif |
| OLD | NEW |