reed | 8f34372 | 2015-08-13 13:32:39 -0700 | [diff] [blame] | 1 | /* |
Brian Osman | 3b65598 | 2017-03-07 16:58:08 -0500 | [diff] [blame] | 2 | * Copyright 2017 Google Inc. |
reed | 8f34372 | 2015-08-13 13:32:39 -0700 | [diff] [blame] | 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
Brian Osman | 3b65598 | 2017-03-07 16:58:08 -0500 | [diff] [blame] | 8 | #ifndef SkGr_DEFINED |
| 9 | #define SkGr_DEFINED |
reed | 8f34372 | 2015-08-13 13:32:39 -0700 | [diff] [blame] | 10 | |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 11 | #include "include/core/SkCanvas.h" |
| 12 | #include "include/core/SkColor.h" |
| 13 | #include "include/core/SkFilterQuality.h" |
| 14 | #include "include/core/SkImageInfo.h" |
| 15 | #include "include/core/SkMatrix.h" |
| 16 | #include "include/core/SkVertices.h" |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 17 | #include "include/gpu/GrTypes.h" |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 18 | #include "include/private/SkColorData.h" |
| 19 | #include "src/core/SkBlendModePriv.h" |
Brian Salomon | 096b091 | 2019-08-14 16:56:13 -0400 | [diff] [blame] | 20 | #include "src/gpu/GrBlend.h" |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 21 | #include "src/gpu/GrCaps.h" |
Greg Daniel | f91aeb2 | 2019-06-18 09:58:02 -0400 | [diff] [blame] | 22 | #include "src/gpu/GrColor.h" |
Brian Salomon | 201cdbb | 2019-08-14 17:00:30 -0400 | [diff] [blame] | 23 | #include "src/gpu/GrSamplerState.h" |
reed | 8f34372 | 2015-08-13 13:32:39 -0700 | [diff] [blame] | 24 | |
| 25 | class GrCaps; |
Brian Salomon | f3569f0 | 2017-10-24 12:52:33 -0400 | [diff] [blame] | 26 | class GrColorSpaceInfo; |
Brian Osman | 3b65598 | 2017-03-07 16:58:08 -0500 | [diff] [blame] | 27 | class GrColorSpaceXform; |
bsalomon | f1b7a1d | 2015-09-28 06:26:28 -0700 | [diff] [blame] | 28 | class GrContext; |
| 29 | class GrFragmentProcessor; |
| 30 | class GrPaint; |
Robert Phillips | 9338c60 | 2019-02-19 12:52:29 -0500 | [diff] [blame] | 31 | class GrRecordingContext; |
Robert Phillips | 26c90e0 | 2017-03-14 14:39:29 -0400 | [diff] [blame] | 32 | class GrResourceProvider; |
Robert Phillips | e14d305 | 2017-02-15 13:18:21 -0500 | [diff] [blame] | 33 | class GrTextureProxy; |
reed | 8f34372 | 2015-08-13 13:32:39 -0700 | [diff] [blame] | 34 | class GrUniqueKey; |
Brian Salomon | 6f1d36c | 2017-01-13 12:02:17 -0500 | [diff] [blame] | 35 | class SkBitmap; |
bsalomon | afa95e2 | 2015-10-12 10:39:46 -0700 | [diff] [blame] | 36 | class SkData; |
bsalomon | f1b7a1d | 2015-09-28 06:26:28 -0700 | [diff] [blame] | 37 | class SkPaint; |
bsalomon | afa95e2 | 2015-10-12 10:39:46 -0700 | [diff] [blame] | 38 | class SkPixelRef; |
Brian Salomon | 6f1d36c | 2017-01-13 12:02:17 -0500 | [diff] [blame] | 39 | class SkPixmap; |
bsalomon | f1b7a1d | 2015-09-28 06:26:28 -0700 | [diff] [blame] | 40 | struct SkIRect; |
reed | 8f34372 | 2015-08-13 13:32:39 -0700 | [diff] [blame] | 41 | |
Brian Osman | 3b65598 | 2017-03-07 16:58:08 -0500 | [diff] [blame] | 42 | //////////////////////////////////////////////////////////////////////////////// |
| 43 | // Color type conversions |
reed | 856e9d9 | 2015-09-30 12:21:45 -0700 | [diff] [blame] | 44 | |
Brian Osman | 3b65598 | 2017-03-07 16:58:08 -0500 | [diff] [blame] | 45 | static inline GrColor SkColorToPremulGrColor(SkColor c) { |
| 46 | SkPMColor pm = SkPreMultiplyColor(c); |
| 47 | unsigned r = SkGetPackedR32(pm); |
| 48 | unsigned g = SkGetPackedG32(pm); |
| 49 | unsigned b = SkGetPackedB32(pm); |
| 50 | unsigned a = SkGetPackedA32(pm); |
| 51 | return GrColorPackRGBA(r, g, b, a); |
| 52 | } |
| 53 | |
| 54 | static inline GrColor SkColorToUnpremulGrColor(SkColor c) { |
| 55 | unsigned r = SkColorGetR(c); |
| 56 | unsigned g = SkColorGetG(c); |
| 57 | unsigned b = SkColorGetB(c); |
| 58 | unsigned a = SkColorGetA(c); |
| 59 | return GrColorPackRGBA(r, g, b, a); |
| 60 | } |
| 61 | |
Brian Osman | f28e55d | 2018-10-03 16:35:54 -0400 | [diff] [blame] | 62 | /** Similar, but using SkPMColor4f. */ |
| 63 | SkPMColor4f SkColorToPMColor4f(SkColor, const GrColorSpaceInfo&); |
| 64 | |
Brian Osman | 8fa7ab4 | 2019-03-18 10:22:42 -0400 | [diff] [blame] | 65 | /** Converts an SkColor4f to the destination color space. */ |
| 66 | SkColor4f SkColor4fPrepForDst(SkColor4f, const GrColorSpaceInfo&); |
| 67 | |
| 68 | /** Returns true if half-floats are required to store the color in a vertex (and half-floats |
| 69 | are supported). */ |
| 70 | static inline bool SkPMColor4fNeedsWideColor(SkPMColor4f color, GrClampType clampType, |
| 71 | const GrCaps& caps) { |
| 72 | return GrClampType::kNone == clampType && |
| 73 | caps.halfFloatVertexAttributeSupport() && |
| 74 | !color.fitsInBytes(); |
| 75 | } |
Brian Osman | 5c8a6b3 | 2018-11-19 11:56:57 -0500 | [diff] [blame] | 76 | |
Brian Osman | 3b65598 | 2017-03-07 16:58:08 -0500 | [diff] [blame] | 77 | //////////////////////////////////////////////////////////////////////////////// |
| 78 | // Paint conversion |
bsalomon | c55271f | 2015-11-09 11:55:57 -0800 | [diff] [blame] | 79 | |
Robert Phillips | 9338c60 | 2019-02-19 12:52:29 -0500 | [diff] [blame] | 80 | /** Converts an SkPaint to a GrPaint for a given GrRecordingContext. The matrix is required in order |
bsalomon | aa48d36 | 2015-10-01 08:34:17 -0700 | [diff] [blame] | 81 | to convert the SkShader (if any) on the SkPaint. The primitive itself has no color. */ |
Robert Phillips | 9338c60 | 2019-02-19 12:52:29 -0500 | [diff] [blame] | 82 | bool SkPaintToGrPaint(GrRecordingContext*, |
Brian Salomon | f3569f0 | 2017-10-24 12:52:33 -0400 | [diff] [blame] | 83 | const GrColorSpaceInfo& dstColorSpaceInfo, |
bsalomon | f1b7a1d | 2015-09-28 06:26:28 -0700 | [diff] [blame] | 84 | const SkPaint& skPaint, |
| 85 | const SkMatrix& viewM, |
| 86 | GrPaint* grPaint); |
| 87 | |
bsalomon | aa48d36 | 2015-10-01 08:34:17 -0700 | [diff] [blame] | 88 | /** Same as above but ignores the SkShader (if any) on skPaint. */ |
Robert Phillips | 9338c60 | 2019-02-19 12:52:29 -0500 | [diff] [blame] | 89 | bool SkPaintToGrPaintNoShader(GrRecordingContext*, |
Brian Salomon | f3569f0 | 2017-10-24 12:52:33 -0400 | [diff] [blame] | 90 | const GrColorSpaceInfo& dstColorSpaceInfo, |
bsalomon | f1b7a1d | 2015-09-28 06:26:28 -0700 | [diff] [blame] | 91 | const SkPaint& skPaint, |
| 92 | GrPaint* grPaint); |
| 93 | |
| 94 | /** Replaces the SkShader (if any) on skPaint with the passed in GrFragmentProcessor. The processor |
bsalomon | aa48d36 | 2015-10-01 08:34:17 -0700 | [diff] [blame] | 95 | should expect an unpremul input color and produce a premultiplied output color. There is |
| 96 | no primitive color. */ |
Robert Phillips | 9338c60 | 2019-02-19 12:52:29 -0500 | [diff] [blame] | 97 | bool SkPaintToGrPaintReplaceShader(GrRecordingContext*, |
Brian Salomon | f3569f0 | 2017-10-24 12:52:33 -0400 | [diff] [blame] | 98 | const GrColorSpaceInfo& dstColorSpaceInfo, |
bsalomon | f1b7a1d | 2015-09-28 06:26:28 -0700 | [diff] [blame] | 99 | const SkPaint& skPaint, |
Brian Salomon | aff329b | 2017-08-11 09:40:37 -0400 | [diff] [blame] | 100 | std::unique_ptr<GrFragmentProcessor> shaderFP, |
bsalomon | f1b7a1d | 2015-09-28 06:26:28 -0700 | [diff] [blame] | 101 | GrPaint* grPaint); |
| 102 | |
| 103 | /** Blends the SkPaint's shader (or color if no shader) with the color which specified via a |
Mike Reed | 185ba21 | 2017-04-28 12:31:05 -0400 | [diff] [blame] | 104 | GrOp's GrPrimitiveProcesssor. */ |
Robert Phillips | 9338c60 | 2019-02-19 12:52:29 -0500 | [diff] [blame] | 105 | bool SkPaintToGrPaintWithXfermode(GrRecordingContext*, |
Brian Salomon | f3569f0 | 2017-10-24 12:52:33 -0400 | [diff] [blame] | 106 | const GrColorSpaceInfo& dstColorSpaceInfo, |
bsalomon | f1b7a1d | 2015-09-28 06:26:28 -0700 | [diff] [blame] | 107 | const SkPaint& skPaint, |
| 108 | const SkMatrix& viewM, |
Mike Reed | 7d954ad | 2016-10-28 15:42:34 -0400 | [diff] [blame] | 109 | SkBlendMode primColorMode, |
bsalomon | f1b7a1d | 2015-09-28 06:26:28 -0700 | [diff] [blame] | 110 | GrPaint* grPaint); |
| 111 | |
bsalomon | aa48d36 | 2015-10-01 08:34:17 -0700 | [diff] [blame] | 112 | /** This is used when there is a primitive color, but the shader should be ignored. Currently, |
| 113 | the expectation is that the primitive color will be premultiplied, though it really should be |
| 114 | unpremultiplied so that interpolation is done in unpremul space. The paint's alpha will be |
| 115 | applied to the primitive color after interpolation. */ |
Robert Phillips | 9338c60 | 2019-02-19 12:52:29 -0500 | [diff] [blame] | 116 | inline bool SkPaintToGrPaintWithPrimitiveColor(GrRecordingContext* context, |
Brian Salomon | f3569f0 | 2017-10-24 12:52:33 -0400 | [diff] [blame] | 117 | const GrColorSpaceInfo& dstColorSpaceInfo, |
Robert Phillips | 9338c60 | 2019-02-19 12:52:29 -0500 | [diff] [blame] | 118 | const SkPaint& skPaint, |
| 119 | GrPaint* grPaint) { |
Brian Salomon | f3569f0 | 2017-10-24 12:52:33 -0400 | [diff] [blame] | 120 | return SkPaintToGrPaintWithXfermode(context, dstColorSpaceInfo, skPaint, SkMatrix::I(), |
| 121 | SkBlendMode::kDst, grPaint); |
bsalomon | aa48d36 | 2015-10-01 08:34:17 -0700 | [diff] [blame] | 122 | } |
| 123 | |
joshualitt | 33a5fce | 2015-11-18 13:28:51 -0800 | [diff] [blame] | 124 | /** This is used when there may or may not be a shader, and the caller wants to plugin a texture |
| 125 | lookup. If there is a shader, then its output will only be used if the texture is alpha8. */ |
Robert Phillips | 9338c60 | 2019-02-19 12:52:29 -0500 | [diff] [blame] | 126 | bool SkPaintToGrPaintWithTexture(GrRecordingContext*, |
Brian Salomon | f3569f0 | 2017-10-24 12:52:33 -0400 | [diff] [blame] | 127 | const GrColorSpaceInfo& dstColorSpaceInfo, |
Robert Phillips | 9338c60 | 2019-02-19 12:52:29 -0500 | [diff] [blame] | 128 | const SkPaint& skPaint, |
joshualitt | 33a5fce | 2015-11-18 13:28:51 -0800 | [diff] [blame] | 129 | const SkMatrix& viewM, |
Brian Salomon | aff329b | 2017-08-11 09:40:37 -0400 | [diff] [blame] | 130 | std::unique_ptr<GrFragmentProcessor> fp, |
joshualitt | 33a5fce | 2015-11-18 13:28:51 -0800 | [diff] [blame] | 131 | bool textureIsAlphaOnly, |
| 132 | GrPaint* grPaint); |
| 133 | |
Brian Osman | 3b65598 | 2017-03-07 16:58:08 -0500 | [diff] [blame] | 134 | //////////////////////////////////////////////////////////////////////////////// |
| 135 | // Misc Sk to Gr type conversions |
| 136 | |
Brian Osman | 2b23c4b | 2018-06-01 12:25:08 -0400 | [diff] [blame] | 137 | GrSurfaceDesc GrImageInfoToSurfaceDesc(const SkImageInfo&); |
| 138 | GrPixelConfig SkColorType2GrPixelConfig(const SkColorType); |
| 139 | GrPixelConfig SkImageInfo2GrPixelConfig(const SkImageInfo& info); |
Brian Osman | 3b65598 | 2017-03-07 16:58:08 -0500 | [diff] [blame] | 140 | |
| 141 | bool GrPixelConfigToColorType(GrPixelConfig, SkColorType*); |
| 142 | |
Chris Dalton | 309c6c0 | 2019-08-13 10:32:47 -0600 | [diff] [blame] | 143 | GrSamplerState::Filter GrSkFilterQualityToGrFilterMode(int imageWidth, int imageHeight, |
| 144 | SkFilterQuality paintFilterQuality, |
Brian Salomon | 2bbdcc4 | 2017-09-07 12:36:34 -0400 | [diff] [blame] | 145 | const SkMatrix& viewM, |
| 146 | const SkMatrix& localM, |
Brian Osman | db78cba | 2018-02-15 10:09:48 -0500 | [diff] [blame] | 147 | bool sharpenMipmappedTextures, |
Brian Salomon | 2bbdcc4 | 2017-09-07 12:36:34 -0400 | [diff] [blame] | 148 | bool* doBicubic); |
Brian Osman | 3b65598 | 2017-03-07 16:58:08 -0500 | [diff] [blame] | 149 | |
bsalomon | f276ac5 | 2015-10-09 13:36:42 -0700 | [diff] [blame] | 150 | ////////////////////////////////////////////////////////////////////////////// |
| 151 | |
Mike Reed | 887cdf1 | 2017-04-03 11:11:09 -0400 | [diff] [blame] | 152 | static inline GrPrimitiveType SkVertexModeToGrPrimitiveType(SkVertices::VertexMode mode) { |
Brian Salomon | 199fb87 | 2017-02-06 09:41:10 -0500 | [diff] [blame] | 153 | switch (mode) { |
Mike Reed | 887cdf1 | 2017-04-03 11:11:09 -0400 | [diff] [blame] | 154 | case SkVertices::kTriangles_VertexMode: |
Chris Dalton | 3809bab | 2017-06-13 10:55:06 -0600 | [diff] [blame] | 155 | return GrPrimitiveType::kTriangles; |
Mike Reed | 887cdf1 | 2017-04-03 11:11:09 -0400 | [diff] [blame] | 156 | case SkVertices::kTriangleStrip_VertexMode: |
Chris Dalton | 3809bab | 2017-06-13 10:55:06 -0600 | [diff] [blame] | 157 | return GrPrimitiveType::kTriangleStrip; |
Mike Reed | 887cdf1 | 2017-04-03 11:11:09 -0400 | [diff] [blame] | 158 | case SkVertices::kTriangleFan_VertexMode: |
Brian Salomon | cccafe8 | 2018-04-28 16:13:08 -0400 | [diff] [blame] | 159 | break; |
Brian Salomon | 199fb87 | 2017-02-06 09:41:10 -0500 | [diff] [blame] | 160 | } |
Ben Wagner | b4aab9a | 2017-08-16 10:53:04 -0400 | [diff] [blame] | 161 | SK_ABORT("Invalid mode"); |
Brian Salomon | 199fb87 | 2017-02-06 09:41:10 -0500 | [diff] [blame] | 162 | } |
| 163 | |
| 164 | ////////////////////////////////////////////////////////////////////////////// |
| 165 | |
Mike Reed | 6b3542a | 2017-06-06 10:41:18 -0400 | [diff] [blame] | 166 | GR_STATIC_ASSERT((int)kZero_GrBlendCoeff == (int)SkBlendModeCoeff::kZero); |
| 167 | GR_STATIC_ASSERT((int)kOne_GrBlendCoeff == (int)SkBlendModeCoeff::kOne); |
| 168 | GR_STATIC_ASSERT((int)kSC_GrBlendCoeff == (int)SkBlendModeCoeff::kSC); |
| 169 | GR_STATIC_ASSERT((int)kISC_GrBlendCoeff == (int)SkBlendModeCoeff::kISC); |
| 170 | GR_STATIC_ASSERT((int)kDC_GrBlendCoeff == (int)SkBlendModeCoeff::kDC); |
| 171 | GR_STATIC_ASSERT((int)kIDC_GrBlendCoeff == (int)SkBlendModeCoeff::kIDC); |
| 172 | GR_STATIC_ASSERT((int)kSA_GrBlendCoeff == (int)SkBlendModeCoeff::kSA); |
| 173 | GR_STATIC_ASSERT((int)kISA_GrBlendCoeff == (int)SkBlendModeCoeff::kISA); |
| 174 | GR_STATIC_ASSERT((int)kDA_GrBlendCoeff == (int)SkBlendModeCoeff::kDA); |
| 175 | GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkBlendModeCoeff::kIDA); |
| 176 | //GR_STATIC_ASSERT(SkXfermode::kCoeffCount == 10); |
Brian Salomon | 587e08f | 2017-01-27 10:59:27 -0500 | [diff] [blame] | 177 | |
Brian Osman | 3b65598 | 2017-03-07 16:58:08 -0500 | [diff] [blame] | 178 | //////////////////////////////////////////////////////////////////////////////// |
| 179 | // Texture management |
Brian Salomon | 587e08f | 2017-01-27 10:59:27 -0500 | [diff] [blame] | 180 | |
Brian Salomon | 2bbdcc4 | 2017-09-07 12:36:34 -0400 | [diff] [blame] | 181 | /** Returns a texture representing the bitmap that is compatible with the GrSamplerState. The |
Brian Osman | 3b65598 | 2017-03-07 16:58:08 -0500 | [diff] [blame] | 182 | * texture is inserted into the cache (unless the bitmap is marked volatile) and can be |
| 183 | * retrieved again via this function. |
| 184 | * The 'scaleAdjust' in/out parameter will be updated to hold any rescaling that needs to be |
| 185 | * performed on the absolute texture coordinates (e.g., if the texture is resized out to |
| 186 | * the next power of two). It can be null if the caller is sure the bitmap won't be resized. |
bsalomon | 045802d | 2015-10-20 07:58:01 -0700 | [diff] [blame] | 187 | */ |
Robert Phillips | 9338c60 | 2019-02-19 12:52:29 -0500 | [diff] [blame] | 188 | sk_sp<GrTextureProxy> GrRefCachedBitmapTextureProxy(GrRecordingContext*, |
Robert Phillips | bbd7a3b | 2017-03-21 08:48:40 -0400 | [diff] [blame] | 189 | const SkBitmap&, |
Brian Salomon | 2bbdcc4 | 2017-09-07 12:36:34 -0400 | [diff] [blame] | 190 | const GrSamplerState&, |
Robert Phillips | bbd7a3b | 2017-03-21 08:48:40 -0400 | [diff] [blame] | 191 | SkScalar scaleAdjust[2]); |
| 192 | |
bsalomon | 045802d | 2015-10-20 07:58:01 -0700 | [diff] [blame] | 193 | /** |
Greg Daniel | 55afd6d | 2017-09-29 09:32:44 -0400 | [diff] [blame] | 194 | * Creates a new texture with mipmap levels and copies the baseProxy into the base layer. |
| 195 | */ |
Robert Phillips | 9338c60 | 2019-02-19 12:52:29 -0500 | [diff] [blame] | 196 | sk_sp<GrTextureProxy> GrCopyBaseMipMapToTextureProxy(GrRecordingContext*, |
Greg Daniel | e1da1d9 | 2017-10-06 15:59:27 -0400 | [diff] [blame] | 197 | GrTextureProxy* baseProxy); |
Greg Daniel | 55afd6d | 2017-09-29 09:32:44 -0400 | [diff] [blame] | 198 | |
Greg Daniel | 7e1912a | 2018-02-08 09:15:33 -0500 | [diff] [blame] | 199 | /* |
| 200 | * Create a texture proxy from the provided bitmap by wrapping it in an image and calling |
| 201 | * GrMakeCachedImageProxy. |
| 202 | */ |
| 203 | sk_sp<GrTextureProxy> GrMakeCachedBitmapProxy(GrProxyProvider*, const SkBitmap& bitmap, |
| 204 | SkBackingFit fit = SkBackingFit::kExact); |
Robert Phillips | e14d305 | 2017-02-15 13:18:21 -0500 | [diff] [blame] | 205 | |
Robert Phillips | 7a92639 | 2018-02-01 15:49:54 -0500 | [diff] [blame] | 206 | /* |
| 207 | * Create a texture proxy from the provided 'srcImage' and add it to the texture cache |
| 208 | * using the key also extracted from 'srcImage'. |
| 209 | */ |
Greg Daniel | 490695b | 2018-02-05 09:34:02 -0500 | [diff] [blame] | 210 | sk_sp<GrTextureProxy> GrMakeCachedImageProxy(GrProxyProvider*, sk_sp<SkImage> srcImage, |
| 211 | SkBackingFit fit = SkBackingFit::kExact); |
Brian Osman | 3b65598 | 2017-03-07 16:58:08 -0500 | [diff] [blame] | 212 | |
| 213 | /** |
| 214 | * Our key includes the offset, width, and height so that bitmaps created by extractSubset() |
| 215 | * are unique. |
| 216 | * |
| 217 | * The imageID is in the shared namespace (see SkNextID::ImageID()) |
| 218 | * - SkBitmap/SkPixelRef |
| 219 | * - SkImage |
| 220 | * - SkImageGenerator |
| 221 | * |
| 222 | * Note: width/height must fit in 16bits for this impl. |
| 223 | */ |
| 224 | void GrMakeKeyFromImageID(GrUniqueKey* key, uint32_t imageID, const SkIRect& imageBounds); |
| 225 | |
| 226 | /** Call this after installing a GrUniqueKey on texture. It will cause the texture's key to be |
| 227 | removed should the bitmap's contents change or be destroyed. */ |
Robert Phillips | a41c685 | 2019-02-07 10:44:10 -0500 | [diff] [blame] | 228 | void GrInstallBitmapUniqueKeyInvalidator(const GrUniqueKey& key, uint32_t contextID, |
Brian Salomon | 238069b | 2018-07-11 15:58:57 -0400 | [diff] [blame] | 229 | SkPixelRef* pixelRef); |
Brian Osman | 3b65598 | 2017-03-07 16:58:08 -0500 | [diff] [blame] | 230 | |
reed | 8f34372 | 2015-08-13 13:32:39 -0700 | [diff] [blame] | 231 | #endif |