Chris Dalton | 0921219 | 2018-11-13 15:07:24 -0500 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018 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 | |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 8 | #include "gm/gm.h" |
Ben Wagner | 7fde8e1 | 2019-05-01 17:28:53 -0400 | [diff] [blame] | 9 | #include "include/core/SkBlendMode.h" |
| 10 | #include "include/core/SkCanvas.h" |
| 11 | #include "include/core/SkColor.h" |
| 12 | #include "include/core/SkMatrix.h" |
| 13 | #include "include/core/SkPoint.h" |
| 14 | #include "include/core/SkRect.h" |
| 15 | #include "include/core/SkRefCnt.h" |
| 16 | #include "include/core/SkString.h" |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 17 | #include "include/gpu/GrContext.h" |
| 18 | #include "include/private/GrRecordingContext.h" |
Ben Wagner | 7fde8e1 | 2019-05-01 17:28:53 -0400 | [diff] [blame] | 19 | #include "include/private/GrTypesPriv.h" |
| 20 | #include "src/gpu/GrBuffer.h" |
| 21 | #include "src/gpu/GrCaps.h" |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 22 | #include "src/gpu/GrContextPriv.h" |
Ben Wagner | 7fde8e1 | 2019-05-01 17:28:53 -0400 | [diff] [blame] | 23 | #include "src/gpu/GrGeometryProcessor.h" |
| 24 | #include "src/gpu/GrGpuBuffer.h" |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 25 | #include "src/gpu/GrMemoryPool.h" |
| 26 | #include "src/gpu/GrOpFlushState.h" |
Greg Daniel | 2d41d0d | 2019-08-26 11:08:51 -0400 | [diff] [blame] | 27 | #include "src/gpu/GrOpsRenderPass.h" |
Ben Wagner | 7fde8e1 | 2019-05-01 17:28:53 -0400 | [diff] [blame] | 28 | #include "src/gpu/GrPipeline.h" |
| 29 | #include "src/gpu/GrPrimitiveProcessor.h" |
| 30 | #include "src/gpu/GrProcessor.h" |
| 31 | #include "src/gpu/GrProcessorSet.h" |
Robert Phillips | 901aff0 | 2019-10-08 12:32:56 -0400 | [diff] [blame] | 32 | #include "src/gpu/GrProgramInfo.h" |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 33 | #include "src/gpu/GrRecordingContextPriv.h" |
| 34 | #include "src/gpu/GrRenderTargetContext.h" |
| 35 | #include "src/gpu/GrRenderTargetContextPriv.h" |
Ben Wagner | 7fde8e1 | 2019-05-01 17:28:53 -0400 | [diff] [blame] | 36 | #include "src/gpu/GrResourceProvider.h" |
| 37 | #include "src/gpu/GrShaderCaps.h" |
| 38 | #include "src/gpu/GrShaderVar.h" |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 39 | #include "src/gpu/glsl/GrGLSLFragmentShaderBuilder.h" |
| 40 | #include "src/gpu/glsl/GrGLSLGeometryProcessor.h" |
Ben Wagner | 7fde8e1 | 2019-05-01 17:28:53 -0400 | [diff] [blame] | 41 | #include "src/gpu/glsl/GrGLSLPrimitiveProcessor.h" |
| 42 | #include "src/gpu/glsl/GrGLSLProgramDataManager.h" |
| 43 | #include "src/gpu/glsl/GrGLSLUniformHandler.h" |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 44 | #include "src/gpu/glsl/GrGLSLVarying.h" |
| 45 | #include "src/gpu/glsl/GrGLSLVertexGeoBuilder.h" |
Ben Wagner | 7fde8e1 | 2019-05-01 17:28:53 -0400 | [diff] [blame] | 46 | #include "src/gpu/ops/GrDrawOp.h" |
| 47 | #include "src/gpu/ops/GrOp.h" |
Robert Phillips | 34cea00 | 2019-11-21 16:02:34 -0500 | [diff] [blame] | 48 | #include "tools/gpu/ProxyUtils.h" |
Ben Wagner | 7fde8e1 | 2019-05-01 17:28:53 -0400 | [diff] [blame] | 49 | |
| 50 | #include <memory> |
| 51 | #include <utility> |
| 52 | |
| 53 | class GrAppliedClip; |
Chris Dalton | 0921219 | 2018-11-13 15:07:24 -0500 | [diff] [blame] | 54 | |
Chris Dalton | 3a77837 | 2019-02-07 15:23:36 -0700 | [diff] [blame] | 55 | /** |
| 56 | * This test ensures that fwidth() works properly on GPU configs by drawing a squircle. |
| 57 | */ |
Chris Dalton | 0921219 | 2018-11-13 15:07:24 -0500 | [diff] [blame] | 58 | namespace skiagm { |
| 59 | |
| 60 | static constexpr GrGeometryProcessor::Attribute gVertex = |
| 61 | {"bboxcoord", kFloat2_GrVertexAttribType, kFloat2_GrSLType}; |
| 62 | |
Chris Dalton | 0921219 | 2018-11-13 15:07:24 -0500 | [diff] [blame] | 63 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| 64 | // SkSL code. |
| 65 | |
| 66 | class FwidthSquircleTestProcessor : public GrGeometryProcessor { |
| 67 | public: |
Robert Phillips | 5d07c52 | 2019-11-18 11:19:51 -0500 | [diff] [blame] | 68 | static GrGeometryProcessor* Make(SkArenaAlloc* arena, const SkMatrix& viewMatrix) { |
| 69 | return arena->make<FwidthSquircleTestProcessor>(viewMatrix); |
| 70 | } |
| 71 | |
| 72 | const char* name() const override { return "FwidthSquircleTestProcessor"; } |
| 73 | |
| 74 | void getGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const final {} |
| 75 | |
| 76 | GrGLSLPrimitiveProcessor* createGLSLInstance(const GrShaderCaps&) const final; |
| 77 | |
| 78 | private: |
| 79 | friend class ::SkArenaAlloc; // for access to ctor |
| 80 | |
Chris Dalton | 0921219 | 2018-11-13 15:07:24 -0500 | [diff] [blame] | 81 | FwidthSquircleTestProcessor(const SkMatrix& viewMatrix) |
| 82 | : GrGeometryProcessor(kFwidthSquircleTestProcessor_ClassID) |
| 83 | , fViewMatrix(viewMatrix) { |
| 84 | this->setVertexAttributes(&gVertex, 1); |
| 85 | } |
Chris Dalton | 0921219 | 2018-11-13 15:07:24 -0500 | [diff] [blame] | 86 | |
Chris Dalton | 0921219 | 2018-11-13 15:07:24 -0500 | [diff] [blame] | 87 | const SkMatrix fViewMatrix; |
| 88 | |
| 89 | class Impl; |
Robert Phillips | 5d07c52 | 2019-11-18 11:19:51 -0500 | [diff] [blame] | 90 | |
| 91 | typedef GrGeometryProcessor INHERITED; |
Chris Dalton | 0921219 | 2018-11-13 15:07:24 -0500 | [diff] [blame] | 92 | }; |
| 93 | |
| 94 | class FwidthSquircleTestProcessor::Impl : public GrGLSLGeometryProcessor { |
| 95 | void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) override { |
| 96 | const auto& proc = args.fGP.cast<FwidthSquircleTestProcessor>(); |
| 97 | |
| 98 | auto* uniforms = args.fUniformHandler; |
Ethan Nicholas | 16464c3 | 2020-04-06 13:53:05 -0400 | [diff] [blame] | 99 | fViewMatrixHandle = uniforms->addUniform(nullptr, kVertex_GrShaderFlag, kFloat3x3_GrSLType, |
| 100 | "viewmatrix"); |
Chris Dalton | 0921219 | 2018-11-13 15:07:24 -0500 | [diff] [blame] | 101 | |
| 102 | auto* varyings = args.fVaryingHandler; |
| 103 | varyings->emitAttributes(proc); |
| 104 | |
| 105 | GrGLSLVarying squircleCoord(kFloat2_GrSLType); |
| 106 | varyings->addVarying("bboxcoord", &squircleCoord); |
| 107 | |
| 108 | auto* v = args.fVertBuilder; |
| 109 | v->codeAppendf("float2x2 R = float2x2(cos(.05), sin(.05), -sin(.05), cos(.05));"); |
| 110 | |
| 111 | v->codeAppendf("%s = bboxcoord * 1.25;", squircleCoord.vsOut()); |
| 112 | v->codeAppendf("float3 vertexpos = float3(bboxcoord * 100 * R + 100, 1);"); |
| 113 | v->codeAppendf("vertexpos = %s * vertexpos;", uniforms->getUniformCStr(fViewMatrixHandle)); |
| 114 | gpArgs->fPositionVar.set(kFloat3_GrSLType, "vertexpos"); |
| 115 | |
| 116 | auto* f = args.fFragBuilder; |
| 117 | f->codeAppendf("float golden_ratio = 1.61803398875;"); |
| 118 | f->codeAppendf("float pi = 3.141592653589793;"); |
| 119 | f->codeAppendf("float x = abs(%s.x), y = abs(%s.y);", |
| 120 | squircleCoord.fsIn(), squircleCoord.fsIn()); |
| 121 | |
| 122 | // Squircle function! |
Ethan Nicholas | e1f5502 | 2019-02-05 17:17:40 -0500 | [diff] [blame] | 123 | f->codeAppendf("float fn = half(pow(x, golden_ratio*pi) + pow(y, golden_ratio*pi) - 1);"); |
Chris Dalton | 0921219 | 2018-11-13 15:07:24 -0500 | [diff] [blame] | 124 | f->codeAppendf("float fnwidth = fwidth(fn);"); |
| 125 | f->codeAppendf("fnwidth += 1e-10;"); // Guard against divide-by-zero. |
Ethan Nicholas | e1f5502 | 2019-02-05 17:17:40 -0500 | [diff] [blame] | 126 | f->codeAppendf("half coverage = clamp(half(.5 - fn/fnwidth), 0, 1);"); |
Chris Dalton | 0921219 | 2018-11-13 15:07:24 -0500 | [diff] [blame] | 127 | |
| 128 | f->codeAppendf("%s = half4(.51, .42, .71, 1) * .89;", args.fOutputColor); |
| 129 | f->codeAppendf("%s = half4(coverage);", args.fOutputCoverage); |
| 130 | } |
| 131 | |
| 132 | void setData(const GrGLSLProgramDataManager& pdman, const GrPrimitiveProcessor& primProc, |
Brian Salomon | c241b58 | 2019-11-27 08:57:17 -0500 | [diff] [blame] | 133 | const CoordTransformRange&) override { |
Chris Dalton | 0921219 | 2018-11-13 15:07:24 -0500 | [diff] [blame] | 134 | const auto& proc = primProc.cast<FwidthSquircleTestProcessor>(); |
| 135 | pdman.setSkMatrix(fViewMatrixHandle, proc.fViewMatrix); |
| 136 | } |
| 137 | |
| 138 | UniformHandle fViewMatrixHandle; |
| 139 | }; |
| 140 | |
| 141 | GrGLSLPrimitiveProcessor* FwidthSquircleTestProcessor::createGLSLInstance( |
| 142 | const GrShaderCaps&) const { |
| 143 | return new Impl(); |
| 144 | } |
| 145 | |
| 146 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| 147 | // Draw Op. |
| 148 | |
| 149 | class FwidthSquircleTestOp : public GrDrawOp { |
| 150 | public: |
| 151 | DEFINE_OP_CLASS_ID |
| 152 | |
Robert Phillips | be9aff2 | 2019-02-15 11:33:22 -0500 | [diff] [blame] | 153 | static std::unique_ptr<GrDrawOp> Make(GrRecordingContext* ctx, const SkMatrix& viewMatrix) { |
Robert Phillips | 9da87e0 | 2019-02-04 13:26:26 -0500 | [diff] [blame] | 154 | GrOpMemoryPool* pool = ctx->priv().opMemoryPool(); |
Chris Dalton | 0921219 | 2018-11-13 15:07:24 -0500 | [diff] [blame] | 155 | return pool->allocate<FwidthSquircleTestOp>(viewMatrix); |
| 156 | } |
| 157 | |
| 158 | private: |
| 159 | FwidthSquircleTestOp(const SkMatrix& viewMatrix) |
| 160 | : GrDrawOp(ClassID()) |
| 161 | , fViewMatrix(viewMatrix) { |
Greg Daniel | 5faf474 | 2019-10-01 15:14:44 -0400 | [diff] [blame] | 162 | this->setBounds(SkRect::MakeIWH(kWidth, kHeight), HasAABloat::kNo, IsHairline::kNo); |
Chris Dalton | 0921219 | 2018-11-13 15:07:24 -0500 | [diff] [blame] | 163 | } |
| 164 | |
Robert Phillips | 901aff0 | 2019-10-08 12:32:56 -0400 | [diff] [blame] | 165 | const char* name() const override { return "FwidthSquircleTestOp"; } |
Chris Dalton | 0921219 | 2018-11-13 15:07:24 -0500 | [diff] [blame] | 166 | FixedFunctionFlags fixedFunctionFlags() const override { return FixedFunctionFlags::kNone; } |
Robert Phillips | 5d07c52 | 2019-11-18 11:19:51 -0500 | [diff] [blame] | 167 | GrProcessorSet::Analysis finalize(const GrCaps&, const GrAppliedClip*, |
| 168 | bool hasMixedSampledCoverage, GrClampType) override { |
Chris Dalton | 4b62aed | 2019-01-15 11:53:00 -0700 | [diff] [blame] | 169 | return GrProcessorSet::EmptySetAnalysis(); |
Chris Dalton | 0921219 | 2018-11-13 15:07:24 -0500 | [diff] [blame] | 170 | } |
Robert Phillips | 5d07c52 | 2019-11-18 11:19:51 -0500 | [diff] [blame] | 171 | |
Robert Phillips | ac6156c | 2020-02-28 16:02:40 -0500 | [diff] [blame] | 172 | GrProgramInfo* createProgramInfo(const GrCaps* caps, |
| 173 | SkArenaAlloc* arena, |
Brian Salomon | 8afde5f | 2020-04-01 16:22:00 -0400 | [diff] [blame] | 174 | const GrSurfaceProxyView* writeView, |
Robert Phillips | ac6156c | 2020-02-28 16:02:40 -0500 | [diff] [blame] | 175 | GrAppliedClip&& appliedClip, |
| 176 | const GrXferProcessor::DstProxyView& dstProxyView) const { |
| 177 | GrGeometryProcessor* geomProc = FwidthSquircleTestProcessor::Make(arena, fViewMatrix); |
| 178 | |
Brian Salomon | 8afde5f | 2020-04-01 16:22:00 -0400 | [diff] [blame] | 179 | return sk_gpu_test::CreateProgramInfo(caps, arena, writeView, |
Robert Phillips | ac6156c | 2020-02-28 16:02:40 -0500 | [diff] [blame] | 180 | std::move(appliedClip), dstProxyView, |
| 181 | geomProc, SkBlendMode::kSrcOver, |
| 182 | GrPrimitiveType::kTriangleStrip); |
| 183 | } |
| 184 | |
| 185 | GrProgramInfo* createProgramInfo(GrOpFlushState* flushState) const { |
| 186 | return this->createProgramInfo(&flushState->caps(), |
| 187 | flushState->allocator(), |
Brian Salomon | 8afde5f | 2020-04-01 16:22:00 -0400 | [diff] [blame] | 188 | flushState->writeView(), |
Robert Phillips | ac6156c | 2020-02-28 16:02:40 -0500 | [diff] [blame] | 189 | flushState->detachAppliedClip(), |
| 190 | flushState->dstProxyView()); |
| 191 | } |
| 192 | |
Robert Phillips | 5d07c52 | 2019-11-18 11:19:51 -0500 | [diff] [blame] | 193 | void onPrePrepare(GrRecordingContext* context, |
Brian Salomon | 8afde5f | 2020-04-01 16:22:00 -0400 | [diff] [blame] | 194 | const GrSurfaceProxyView* writeView, |
Robert Phillips | 34cea00 | 2019-11-21 16:02:34 -0500 | [diff] [blame] | 195 | GrAppliedClip* clip, |
Robert Phillips | 8053c97 | 2019-11-21 10:44:53 -0500 | [diff] [blame] | 196 | const GrXferProcessor::DstProxyView& dstProxyView) final { |
Robert Phillips | 5d07c52 | 2019-11-18 11:19:51 -0500 | [diff] [blame] | 197 | SkArenaAlloc* arena = context->priv().recordTimeAllocator(); |
| 198 | |
Robert Phillips | 34cea00 | 2019-11-21 16:02:34 -0500 | [diff] [blame] | 199 | // This is equivalent to a GrOpFlushState::detachAppliedClip |
| 200 | GrAppliedClip appliedClip = clip ? std::move(*clip) : GrAppliedClip(); |
Robert Phillips | 5d07c52 | 2019-11-18 11:19:51 -0500 | [diff] [blame] | 201 | |
Brian Salomon | 8afde5f | 2020-04-01 16:22:00 -0400 | [diff] [blame] | 202 | fProgramInfo = this->createProgramInfo(context->priv().caps(), arena, writeView, |
Robert Phillips | ac6156c | 2020-02-28 16:02:40 -0500 | [diff] [blame] | 203 | std::move(appliedClip), dstProxyView); |
Robert Phillips | 5d07c52 | 2019-11-18 11:19:51 -0500 | [diff] [blame] | 204 | |
Robert Phillips | ac6156c | 2020-02-28 16:02:40 -0500 | [diff] [blame] | 205 | context->priv().recordProgramInfo(fProgramInfo); |
Robert Phillips | 5d07c52 | 2019-11-18 11:19:51 -0500 | [diff] [blame] | 206 | } |
| 207 | |
| 208 | void onPrepare(GrOpFlushState* flushState) final { |
Chris Dalton | 0921219 | 2018-11-13 15:07:24 -0500 | [diff] [blame] | 209 | SkPoint vertices[4] = { |
| 210 | {-1, -1}, |
| 211 | {+1, -1}, |
| 212 | {-1, +1}, |
| 213 | {+1, +1}, |
| 214 | }; |
Greg Daniel | f793de1 | 2019-09-05 13:23:23 -0400 | [diff] [blame] | 215 | fVertexBuffer = flushState->resourceProvider()->createBuffer( |
| 216 | sizeof(vertices), GrGpuBufferType::kVertex, kStatic_GrAccessPattern, vertices); |
| 217 | } |
Robert Phillips | 5d07c52 | 2019-11-18 11:19:51 -0500 | [diff] [blame] | 218 | |
| 219 | void onExecute(GrOpFlushState* flushState, const SkRect& chainBounds) final { |
Greg Daniel | f793de1 | 2019-09-05 13:23:23 -0400 | [diff] [blame] | 220 | if (!fVertexBuffer) { |
Chris Dalton | 0921219 | 2018-11-13 15:07:24 -0500 | [diff] [blame] | 221 | return; |
| 222 | } |
Robert Phillips | 901aff0 | 2019-10-08 12:32:56 -0400 | [diff] [blame] | 223 | |
Robert Phillips | 34cea00 | 2019-11-21 16:02:34 -0500 | [diff] [blame] | 224 | if (!fProgramInfo) { |
Robert Phillips | ac6156c | 2020-02-28 16:02:40 -0500 | [diff] [blame] | 225 | fProgramInfo = this->createProgramInfo(flushState); |
Robert Phillips | 34cea00 | 2019-11-21 16:02:34 -0500 | [diff] [blame] | 226 | } |
| 227 | |
Chris Dalton | aa0e45c | 2020-03-16 10:05:11 -0600 | [diff] [blame] | 228 | flushState->bindPipeline(*fProgramInfo, SkRect::MakeIWH(kWidth, kHeight)); |
| 229 | flushState->bindBuffers(nullptr, nullptr, fVertexBuffer.get()); |
| 230 | flushState->draw(4, 0); |
Robert Phillips | 5d07c52 | 2019-11-18 11:19:51 -0500 | [diff] [blame] | 231 | |
Chris Dalton | 0921219 | 2018-11-13 15:07:24 -0500 | [diff] [blame] | 232 | } |
| 233 | |
Greg Daniel | 55e5be3 | 2019-09-30 12:23:26 -0400 | [diff] [blame] | 234 | static const int kWidth = 200; |
| 235 | static const int kHeight = 200; |
Chris Dalton | 0921219 | 2018-11-13 15:07:24 -0500 | [diff] [blame] | 236 | |
Robert Phillips | 5d07c52 | 2019-11-18 11:19:51 -0500 | [diff] [blame] | 237 | sk_sp<GrBuffer> fVertexBuffer; |
| 238 | const SkMatrix fViewMatrix; |
| 239 | |
| 240 | // The program info (and both the GrPipeline and GrPrimitiveProcessor it relies on), when |
Robert Phillips | 34cea00 | 2019-11-21 16:02:34 -0500 | [diff] [blame] | 241 | // allocated, are allocated in either the ddl-record-time or flush-time arena. It is the |
| 242 | // arena's job to free up their memory so we just have a bare programInfo pointer here. We |
| 243 | // don't even store the GrPipeline and GrPrimitiveProcessor pointers here bc they are |
| 244 | // guaranteed to have the same lifetime as the program info. |
Robert Phillips | 5d07c52 | 2019-11-18 11:19:51 -0500 | [diff] [blame] | 245 | GrProgramInfo* fProgramInfo = nullptr; |
| 246 | |
Chris Dalton | 0921219 | 2018-11-13 15:07:24 -0500 | [diff] [blame] | 247 | friend class ::GrOpMemoryPool; // for ctor |
Robert Phillips | 5d07c52 | 2019-11-18 11:19:51 -0500 | [diff] [blame] | 248 | |
| 249 | typedef GrDrawOp INHERITED; |
Chris Dalton | 0921219 | 2018-11-13 15:07:24 -0500 | [diff] [blame] | 250 | }; |
| 251 | |
| 252 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| 253 | // Test. |
| 254 | |
Chris Dalton | 50e24d7 | 2019-02-07 16:20:09 -0700 | [diff] [blame] | 255 | DEF_SIMPLE_GPU_GM_CAN_FAIL(fwidth_squircle, ctx, rtc, canvas, errorMsg, 200, 200) { |
Robert Phillips | 9da87e0 | 2019-02-04 13:26:26 -0500 | [diff] [blame] | 256 | if (!ctx->priv().caps()->shaderCaps()->shaderDerivativeSupport()) { |
Chris Dalton | 50e24d7 | 2019-02-07 16:20:09 -0700 | [diff] [blame] | 257 | *errorMsg = "Shader derivatives not supported."; |
| 258 | return DrawResult::kSkip; |
Chris Dalton | 0921219 | 2018-11-13 15:07:24 -0500 | [diff] [blame] | 259 | } |
| 260 | |
| 261 | // Draw the test directly to the frame buffer. |
Chris Dalton | 3a77837 | 2019-02-07 15:23:36 -0700 | [diff] [blame] | 262 | canvas->clear(SK_ColorWHITE); |
Chris Dalton | 0921219 | 2018-11-13 15:07:24 -0500 | [diff] [blame] | 263 | rtc->priv().testingOnly_addDrawOp(FwidthSquircleTestOp::Make(ctx, canvas->getTotalMatrix())); |
Chris Dalton | 50e24d7 | 2019-02-07 16:20:09 -0700 | [diff] [blame] | 264 | return skiagm::DrawResult::kOk; |
Chris Dalton | 0921219 | 2018-11-13 15:07:24 -0500 | [diff] [blame] | 265 | } |
| 266 | |
Chris Dalton | 0921219 | 2018-11-13 15:07:24 -0500 | [diff] [blame] | 267 | } |