bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2012 Google Inc. |
| 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 | |
| 8 | #include "GrConfigConversionEffect.h" |
bsalomon@google.com | b1456d7 | 2012-11-02 18:23:45 +0000 | [diff] [blame^] | 9 | #include "GrContext.h" |
bsalomon@google.com | 2eaaefd | 2012-10-29 19:51:22 +0000 | [diff] [blame] | 10 | #include "GrTBackendEffectFactory.h" |
bsalomon@google.com | d698f77 | 2012-10-25 13:22:00 +0000 | [diff] [blame] | 11 | #include "gl/GrGLEffect.h" |
bsalomon@google.com | b1456d7 | 2012-11-02 18:23:45 +0000 | [diff] [blame^] | 12 | #include "gl/GrGLEffectMatrix.h" |
| 13 | #include "SkMatrix.h" |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 14 | |
bsalomon@google.com | 22a800a | 2012-10-26 19:16:46 +0000 | [diff] [blame] | 15 | class GrGLConfigConversionEffect : public GrGLEffect { |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 16 | public: |
bsalomon@google.com | 396e61f | 2012-10-25 19:00:29 +0000 | [diff] [blame] | 17 | GrGLConfigConversionEffect(const GrBackendEffectFactory& factory, |
bsalomon@google.com | a469c28 | 2012-10-24 18:28:34 +0000 | [diff] [blame] | 18 | const GrEffect& s) : INHERITED (factory) { |
bsalomon@google.com | 021fc73 | 2012-10-25 12:47:42 +0000 | [diff] [blame] | 19 | const GrConfigConversionEffect& effect = static_cast<const GrConfigConversionEffect&>(s); |
| 20 | fSwapRedAndBlue = effect.swapsRedAndBlue(); |
| 21 | fPMConversion = effect.pmConversion(); |
bsalomon@google.com | b1456d7 | 2012-11-02 18:23:45 +0000 | [diff] [blame^] | 22 | fRequiresTextureMatrix = false; |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 23 | } |
| 24 | |
bsalomon@google.com | 22a800a | 2012-10-26 19:16:46 +0000 | [diff] [blame] | 25 | virtual void emitCode(GrGLShaderBuilder* builder, |
bsalomon@google.com | 2eaaefd | 2012-10-29 19:51:22 +0000 | [diff] [blame] | 26 | const GrEffectStage&, |
bsalomon@google.com | b1456d7 | 2012-11-02 18:23:45 +0000 | [diff] [blame^] | 27 | EffectKey key, |
bsalomon@google.com | 22a800a | 2012-10-26 19:16:46 +0000 | [diff] [blame] | 28 | const char* vertexCoords, |
| 29 | const char* outputColor, |
| 30 | const char* inputColor, |
| 31 | const TextureSamplerArray& samplers) SK_OVERRIDE { |
bsalomon@google.com | b1456d7 | 2012-11-02 18:23:45 +0000 | [diff] [blame^] | 32 | const char* coords; |
| 33 | GrSLType coordsType = fEffectMatrix.emitCode(builder, key, vertexCoords, &coords); |
bsalomon@google.com | 868a8e7 | 2012-08-30 19:11:34 +0000 | [diff] [blame] | 34 | builder->fFSCode.appendf("\t\t%s = ", outputColor); |
bsalomon@google.com | b1456d7 | 2012-11-02 18:23:45 +0000 | [diff] [blame^] | 35 | builder->appendTextureLookup(&builder->fFSCode, samplers[0], coords, coordsType); |
bsalomon@google.com | 2d8edaf | 2012-09-07 14:47:31 +0000 | [diff] [blame] | 36 | builder->fFSCode.append(";\n"); |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 37 | if (GrConfigConversionEffect::kNone_PMConversion == fPMConversion) { |
| 38 | GrAssert(fSwapRedAndBlue); |
bsalomon@google.com | 868a8e7 | 2012-08-30 19:11:34 +0000 | [diff] [blame] | 39 | builder->fFSCode.appendf("\t%s = %s.bgra;\n", outputColor, outputColor); |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 40 | } else { |
| 41 | const char* swiz = fSwapRedAndBlue ? "bgr" : "rgb"; |
| 42 | switch (fPMConversion) { |
| 43 | case GrConfigConversionEffect::kMulByAlpha_RoundUp_PMConversion: |
| 44 | builder->fFSCode.appendf( |
bsalomon@google.com | 868a8e7 | 2012-08-30 19:11:34 +0000 | [diff] [blame] | 45 | "\t\t%s = vec4(ceil(%s.%s * %s.a * 255.0) / 255.0, %s.a);\n", |
| 46 | outputColor, outputColor, swiz, outputColor, outputColor); |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 47 | break; |
| 48 | case GrConfigConversionEffect::kMulByAlpha_RoundDown_PMConversion: |
| 49 | builder->fFSCode.appendf( |
bsalomon@google.com | 868a8e7 | 2012-08-30 19:11:34 +0000 | [diff] [blame] | 50 | "\t\t%s = vec4(floor(%s.%s * %s.a * 255.0) / 255.0, %s.a);\n", |
| 51 | outputColor, outputColor, swiz, outputColor, outputColor); |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 52 | break; |
| 53 | case GrConfigConversionEffect::kDivByAlpha_RoundUp_PMConversion: |
bsalomon@google.com | 868a8e7 | 2012-08-30 19:11:34 +0000 | [diff] [blame] | 54 | builder->fFSCode.appendf("\t\t%s = %s.a <= 0.0 ? vec4(0,0,0,0) : vec4(ceil(%s.%s / %s.a * 255.0) / 255.0, %s.a);\n", |
| 55 | outputColor, outputColor, outputColor, swiz, outputColor, outputColor); |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 56 | break; |
| 57 | case GrConfigConversionEffect::kDivByAlpha_RoundDown_PMConversion: |
bsalomon@google.com | 868a8e7 | 2012-08-30 19:11:34 +0000 | [diff] [blame] | 58 | builder->fFSCode.appendf("\t\t%s = %s.a <= 0.0 ? vec4(0,0,0,0) : vec4(floor(%s.%s / %s.a * 255.0) / 255.0, %s.a);\n", |
| 59 | outputColor, outputColor, outputColor, swiz, outputColor, outputColor); |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 60 | break; |
robertphillips@google.com | 2af1b18 | 2012-08-28 11:23:09 +0000 | [diff] [blame] | 61 | default: |
| 62 | GrCrash("Unknown conversion op."); |
| 63 | break; |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 64 | } |
| 65 | } |
bsalomon@google.com | 868a8e7 | 2012-08-30 19:11:34 +0000 | [diff] [blame] | 66 | GrGLSLMulVarBy4f(&builder->fFSCode, 2, outputColor, inputColor); |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 67 | } |
| 68 | |
bsalomon@google.com | b1456d7 | 2012-11-02 18:23:45 +0000 | [diff] [blame^] | 69 | void setData(const GrGLUniformManager& uman, const GrEffectStage& stage) { |
| 70 | const GrConfigConversionEffect& effect = |
| 71 | static_cast<const GrConfigConversionEffect&>(*stage.getEffect()); |
| 72 | fEffectMatrix.setData(uman, |
| 73 | effect.getMatrix(), |
| 74 | stage.getCoordChangeMatrix(), |
| 75 | effect.texture(0)); |
| 76 | } |
| 77 | |
bsalomon@google.com | 2eaaefd | 2012-10-29 19:51:22 +0000 | [diff] [blame] | 78 | static inline EffectKey GenKey(const GrEffectStage& s, const GrGLCaps&) { |
| 79 | const GrConfigConversionEffect& effect = |
| 80 | static_cast<const GrConfigConversionEffect&>(*s.getEffect()); |
bsalomon@google.com | b1456d7 | 2012-11-02 18:23:45 +0000 | [diff] [blame^] | 81 | EffectKey key = static_cast<EffectKey>(effect.swapsRedAndBlue()) | |
| 82 | (effect.pmConversion() << 1); |
| 83 | key <<= GrGLEffectMatrix::kKeyBits; |
| 84 | EffectKey matrixKey = GrGLEffectMatrix::GenKey(effect.getMatrix(), |
| 85 | s.getCoordChangeMatrix(), |
| 86 | effect.texture(0)); |
| 87 | GrAssert(!(matrixKey & key)); |
| 88 | return matrixKey | key; |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 89 | } |
| 90 | |
| 91 | private: |
| 92 | bool fSwapRedAndBlue; |
| 93 | GrConfigConversionEffect::PMConversion fPMConversion; |
bsalomon@google.com | b1456d7 | 2012-11-02 18:23:45 +0000 | [diff] [blame^] | 94 | GrGLEffectMatrix fEffectMatrix; |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 95 | |
bsalomon@google.com | 22a800a | 2012-10-26 19:16:46 +0000 | [diff] [blame] | 96 | typedef GrGLEffect INHERITED; |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 97 | |
| 98 | }; |
| 99 | |
| 100 | /////////////////////////////////////////////////////////////////////////////// |
| 101 | |
| 102 | GrConfigConversionEffect::GrConfigConversionEffect(GrTexture* texture, |
| 103 | bool swapRedAndBlue, |
bsalomon@google.com | b1456d7 | 2012-11-02 18:23:45 +0000 | [diff] [blame^] | 104 | PMConversion pmConversion, |
| 105 | const SkMatrix& matrix) |
| 106 | : GrSingleTextureEffect(texture, matrix) |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 107 | , fSwapRedAndBlue(swapRedAndBlue) |
| 108 | , fPMConversion(pmConversion) { |
| 109 | GrAssert(kRGBA_8888_GrPixelConfig == texture->config() || |
| 110 | kBGRA_8888_GrPixelConfig == texture->config()); |
| 111 | // Why did we pollute our texture cache instead of using a GrSingleTextureEffect? |
| 112 | GrAssert(swapRedAndBlue || kNone_PMConversion != pmConversion); |
| 113 | } |
| 114 | |
bsalomon@google.com | 396e61f | 2012-10-25 19:00:29 +0000 | [diff] [blame] | 115 | const GrBackendEffectFactory& GrConfigConversionEffect::getFactory() const { |
| 116 | return GrTBackendEffectFactory<GrConfigConversionEffect>::getInstance(); |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 117 | } |
| 118 | |
bsalomon@google.com | a469c28 | 2012-10-24 18:28:34 +0000 | [diff] [blame] | 119 | bool GrConfigConversionEffect::isEqual(const GrEffect& s) const { |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 120 | const GrConfigConversionEffect& other = static_cast<const GrConfigConversionEffect&>(s); |
| 121 | return other.fSwapRedAndBlue == fSwapRedAndBlue && other.fPMConversion == fPMConversion; |
| 122 | } |
| 123 | |
| 124 | /////////////////////////////////////////////////////////////////////////////// |
| 125 | |
bsalomon@google.com | f271cc7 | 2012-10-24 19:35:13 +0000 | [diff] [blame] | 126 | GR_DEFINE_EFFECT_TEST(GrConfigConversionEffect); |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 127 | |
bsalomon@google.com | a469c28 | 2012-10-24 18:28:34 +0000 | [diff] [blame] | 128 | GrEffect* GrConfigConversionEffect::TestCreate(SkRandom* random, |
| 129 | GrContext* context, |
| 130 | GrTexture* textures[]) { |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 131 | PMConversion pmConv = static_cast<PMConversion>(random->nextULessThan(kPMConversionCnt)); |
| 132 | bool swapRB; |
| 133 | if (kNone_PMConversion == pmConv) { |
| 134 | swapRB = true; |
| 135 | } else { |
| 136 | swapRB = random->nextBool(); |
| 137 | } |
bsalomon@google.com | b1456d7 | 2012-11-02 18:23:45 +0000 | [diff] [blame^] | 138 | return SkNEW_ARGS(GrConfigConversionEffect, (textures[GrEffectUnitTest::kSkiaPMTextureIdx], |
| 139 | swapRB, |
| 140 | pmConv, |
| 141 | GrEffectUnitTest::TestMatrix(random))); |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 142 | } |
| 143 | |
| 144 | /////////////////////////////////////////////////////////////////////////////// |
| 145 | void GrConfigConversionEffect::TestForPreservingPMConversions(GrContext* context, |
| 146 | PMConversion* pmToUPMRule, |
| 147 | PMConversion* upmToPMRule) { |
| 148 | *pmToUPMRule = kNone_PMConversion; |
| 149 | *upmToPMRule = kNone_PMConversion; |
| 150 | SkAutoTMalloc<uint32_t> data(256 * 256 * 3); |
| 151 | uint32_t* srcData = data.get(); |
| 152 | uint32_t* firstRead = data.get() + 256 * 256; |
| 153 | uint32_t* secondRead = data.get() + 2 * 256 * 256; |
| 154 | |
| 155 | // Fill with every possible premultiplied A, color channel value. There will be 256-y duplicate |
| 156 | // values in row y. We set r,g, and b to the same value since they are handled identically. |
| 157 | for (int y = 0; y < 256; ++y) { |
| 158 | for (int x = 0; x < 256; ++x) { |
| 159 | uint8_t* color = reinterpret_cast<uint8_t*>(&srcData[256*y + x]); |
| 160 | color[3] = y; |
| 161 | color[2] = GrMin(x, y); |
| 162 | color[1] = GrMin(x, y); |
| 163 | color[0] = GrMin(x, y); |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | GrTextureDesc desc; |
| 168 | desc.fFlags = kRenderTarget_GrTextureFlagBit | |
| 169 | kNoStencil_GrTextureFlagBit; |
| 170 | desc.fWidth = 256; |
| 171 | desc.fHeight = 256; |
| 172 | desc.fConfig = kRGBA_8888_GrPixelConfig; |
| 173 | |
| 174 | SkAutoTUnref<GrTexture> readTex(context->createUncachedTexture(desc, NULL, 0)); |
| 175 | if (!readTex.get()) { |
| 176 | return; |
| 177 | } |
| 178 | SkAutoTUnref<GrTexture> tempTex(context->createUncachedTexture(desc, NULL, 0)); |
| 179 | if (!tempTex.get()) { |
| 180 | return; |
| 181 | } |
| 182 | desc.fFlags = kNone_GrTextureFlags; |
| 183 | SkAutoTUnref<GrTexture> dataTex(context->createUncachedTexture(desc, data, 0)); |
| 184 | if (!dataTex.get()) { |
| 185 | return; |
| 186 | } |
| 187 | |
| 188 | static const PMConversion kConversionRules[][2] = { |
| 189 | {kDivByAlpha_RoundDown_PMConversion, kMulByAlpha_RoundUp_PMConversion}, |
| 190 | {kDivByAlpha_RoundUp_PMConversion, kMulByAlpha_RoundDown_PMConversion}, |
| 191 | }; |
| 192 | |
| 193 | GrContext::AutoWideOpenIdentityDraw awoid(context, NULL); |
| 194 | |
| 195 | bool failed = true; |
| 196 | |
| 197 | for (size_t i = 0; i < GR_ARRAY_COUNT(kConversionRules) && failed; ++i) { |
| 198 | *pmToUPMRule = kConversionRules[i][0]; |
| 199 | *upmToPMRule = kConversionRules[i][1]; |
| 200 | |
bsalomon@google.com | 8171288 | 2012-11-01 17:12:34 +0000 | [diff] [blame] | 201 | static const GrRect kDstRect = GrRect::MakeWH(SkIntToScalar(256), SkIntToScalar(256)); |
| 202 | static const GrRect kSrcRect = GrRect::MakeWH(SK_Scalar1, SK_Scalar1); |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 203 | // We do a PM->UPM draw from dataTex to readTex and read the data. Then we do a UPM->PM draw |
| 204 | // from readTex to tempTex followed by a PM->UPM draw to readTex and finally read the data. |
| 205 | // We then verify that two reads produced the same values. |
| 206 | |
| 207 | GrPaint paint; |
bsalomon@google.com | 021fc73 | 2012-10-25 12:47:42 +0000 | [diff] [blame] | 208 | SkAutoTUnref<GrEffect> pmToUPMEffect1(SkNEW_ARGS(GrConfigConversionEffect, |
bsalomon@google.com | b1456d7 | 2012-11-02 18:23:45 +0000 | [diff] [blame^] | 209 | (dataTex, |
| 210 | false, |
| 211 | *pmToUPMRule, |
| 212 | SkMatrix::I()))); |
bsalomon@google.com | 021fc73 | 2012-10-25 12:47:42 +0000 | [diff] [blame] | 213 | SkAutoTUnref<GrEffect> upmToPMEffect(SkNEW_ARGS(GrConfigConversionEffect, |
bsalomon@google.com | b1456d7 | 2012-11-02 18:23:45 +0000 | [diff] [blame^] | 214 | (readTex, |
| 215 | false, |
| 216 | *upmToPMRule, |
| 217 | SkMatrix::I()))); |
bsalomon@google.com | 021fc73 | 2012-10-25 12:47:42 +0000 | [diff] [blame] | 218 | SkAutoTUnref<GrEffect> pmToUPMEffect2(SkNEW_ARGS(GrConfigConversionEffect, |
bsalomon@google.com | b1456d7 | 2012-11-02 18:23:45 +0000 | [diff] [blame^] | 219 | (tempTex, |
| 220 | false, |
| 221 | *pmToUPMRule, |
| 222 | SkMatrix::I()))); |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 223 | |
| 224 | context->setRenderTarget(readTex->asRenderTarget()); |
bsalomon@google.com | 08283af | 2012-10-26 13:01:20 +0000 | [diff] [blame] | 225 | paint.colorStage(0)->setEffect(pmToUPMEffect1); |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 226 | context->drawRectToRect(paint, kDstRect, kSrcRect); |
| 227 | |
| 228 | readTex->readPixels(0, 0, 256, 256, kRGBA_8888_GrPixelConfig, firstRead); |
| 229 | |
| 230 | context->setRenderTarget(tempTex->asRenderTarget()); |
bsalomon@google.com | 08283af | 2012-10-26 13:01:20 +0000 | [diff] [blame] | 231 | paint.colorStage(0)->setEffect(upmToPMEffect); |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 232 | context->drawRectToRect(paint, kDstRect, kSrcRect); |
| 233 | context->setRenderTarget(readTex->asRenderTarget()); |
bsalomon@google.com | 08283af | 2012-10-26 13:01:20 +0000 | [diff] [blame] | 234 | paint.colorStage(0)->setEffect(pmToUPMEffect2); |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 235 | context->drawRectToRect(paint, kDstRect, kSrcRect); |
| 236 | |
| 237 | readTex->readPixels(0, 0, 256, 256, kRGBA_8888_GrPixelConfig, secondRead); |
| 238 | |
| 239 | failed = false; |
| 240 | for (int y = 0; y < 256 && !failed; ++y) { |
| 241 | for (int x = 0; x <= y; ++x) { |
| 242 | if (firstRead[256 * y + x] != secondRead[256 * y + x]) { |
| 243 | failed = true; |
| 244 | break; |
| 245 | } |
| 246 | } |
| 247 | } |
| 248 | } |
| 249 | if (failed) { |
| 250 | *pmToUPMRule = kNone_PMConversion; |
| 251 | *upmToPMRule = kNone_PMConversion; |
| 252 | } |
| 253 | } |
| 254 | |
bsalomon@google.com | d8b5fac | 2012-11-01 17:02:46 +0000 | [diff] [blame] | 255 | bool GrConfigConversionEffect::InstallEffect(GrTexture* texture, |
| 256 | bool swapRedAndBlue, |
| 257 | PMConversion pmConversion, |
bsalomon@google.com | b9086a0 | 2012-11-01 18:02:54 +0000 | [diff] [blame] | 258 | const SkMatrix& matrix, |
bsalomon@google.com | d8b5fac | 2012-11-01 17:02:46 +0000 | [diff] [blame] | 259 | GrEffectStage* stage) { |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 260 | if (!swapRedAndBlue && kNone_PMConversion == pmConversion) { |
| 261 | // If we returned a GrConfigConversionEffect that was equivalent to a GrSingleTextureEffect |
| 262 | // then we may pollute our texture cache with redundant shaders. So in the case that no |
| 263 | // conversions were requested we instead return a GrSingleTextureEffect. |
bsalomon@google.com | d8b5fac | 2012-11-01 17:02:46 +0000 | [diff] [blame] | 264 | stage->setEffect(SkNEW_ARGS(GrSingleTextureEffect, (texture, matrix)), matrix)->unref(); |
| 265 | return true; |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 266 | } else { |
| 267 | if (kRGBA_8888_GrPixelConfig != texture->config() && |
| 268 | kBGRA_8888_GrPixelConfig != texture->config() && |
| 269 | kNone_PMConversion != pmConversion) { |
| 270 | // The PM conversions assume colors are 0..255 |
bsalomon@google.com | d8b5fac | 2012-11-01 17:02:46 +0000 | [diff] [blame] | 271 | return false; |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 272 | } |
bsalomon@google.com | d8b5fac | 2012-11-01 17:02:46 +0000 | [diff] [blame] | 273 | stage->setEffect(SkNEW_ARGS(GrConfigConversionEffect, (texture, |
| 274 | swapRedAndBlue, |
bsalomon@google.com | b1456d7 | 2012-11-02 18:23:45 +0000 | [diff] [blame^] | 275 | pmConversion, matrix)))->unref(); |
bsalomon@google.com | d8b5fac | 2012-11-01 17:02:46 +0000 | [diff] [blame] | 276 | return true; |
bsalomon@google.com | a04e8e8 | 2012-08-27 12:53:13 +0000 | [diff] [blame] | 277 | } |
| 278 | } |