epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2006 The Android Open Source Project |
| 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 | |
Florin Malita | 9206c76 | 2017-01-30 12:08:05 -0500 | [diff] [blame] | 8 | #include "SkArenaAlloc.h" |
herb | b906daf | 2015-09-29 09:37:59 -0700 | [diff] [blame] | 9 | #include "SkAtomics.h" |
commit-bot@chromium.org | a5572e5 | 2014-03-07 03:24:41 +0000 | [diff] [blame] | 10 | #include "SkBitmapProcShader.h" |
reed | 8367b8c | 2014-08-22 08:30:20 -0700 | [diff] [blame] | 11 | #include "SkColorShader.h" |
Florin Malita | 47e55a5 | 2017-06-06 12:26:54 -0400 | [diff] [blame] | 12 | #include "SkColorSpaceXformer.h" |
commit-bot@chromium.org | ce56d96 | 2014-05-05 18:39:18 +0000 | [diff] [blame] | 13 | #include "SkEmptyShader.h" |
commit-bot@chromium.org | a5572e5 | 2014-03-07 03:24:41 +0000 | [diff] [blame] | 14 | #include "SkMallocPixelRef.h" |
| 15 | #include "SkPaint.h" |
commit-bot@chromium.org | c5d9bb0 | 2014-04-08 15:19:34 +0000 | [diff] [blame] | 16 | #include "SkPicture.h" |
| 17 | #include "SkPictureShader.h" |
Florin Malita | 9206c76 | 2017-01-30 12:08:05 -0500 | [diff] [blame] | 18 | #include "SkPM4fPriv.h" |
| 19 | #include "SkRasterPipeline.h" |
mtklein | 1b24933 | 2015-07-07 12:21:21 -0700 | [diff] [blame] | 20 | #include "SkReadBuffer.h" |
vandebo@chromium.org | d3ae779 | 2011-02-24 00:21:06 +0000 | [diff] [blame] | 21 | #include "SkScalar.h" |
Florin Malita | 4aed138 | 2017-05-25 10:38:07 -0400 | [diff] [blame] | 22 | #include "SkShaderBase.h" |
Florin Malita | 9206c76 | 2017-01-30 12:08:05 -0500 | [diff] [blame] | 23 | #include "SkTLazy.h" |
commit-bot@chromium.org | 8b0e8ac | 2014-01-30 18:58:24 +0000 | [diff] [blame] | 24 | #include "SkWriteBuffer.h" |
Mike Klein | dc80eaa | 2017-04-21 12:39:08 -0400 | [diff] [blame] | 25 | #include "../jumper/SkJumper.h" |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 26 | |
bungeman | 06ca8ec | 2016-06-09 08:01:03 -0700 | [diff] [blame] | 27 | #if SK_SUPPORT_GPU |
| 28 | #include "GrFragmentProcessor.h" |
| 29 | #endif |
| 30 | |
commit-bot@chromium.org | 8fae213 | 2014-05-07 22:26:37 +0000 | [diff] [blame] | 31 | //#define SK_TRACK_SHADER_LIFETIME |
| 32 | |
| 33 | #ifdef SK_TRACK_SHADER_LIFETIME |
| 34 | static int32_t gShaderCounter; |
| 35 | #endif |
| 36 | |
| 37 | static inline void inc_shader_counter() { |
| 38 | #ifdef SK_TRACK_SHADER_LIFETIME |
| 39 | int32_t prev = sk_atomic_inc(&gShaderCounter); |
| 40 | SkDebugf("+++ shader counter %d\n", prev + 1); |
| 41 | #endif |
| 42 | } |
| 43 | static inline void dec_shader_counter() { |
| 44 | #ifdef SK_TRACK_SHADER_LIFETIME |
| 45 | int32_t prev = sk_atomic_dec(&gShaderCounter); |
| 46 | SkDebugf("--- shader counter %d\n", prev - 1); |
| 47 | #endif |
| 48 | } |
| 49 | |
Florin Malita | 4aed138 | 2017-05-25 10:38:07 -0400 | [diff] [blame] | 50 | SkShaderBase::SkShaderBase(const SkMatrix* localMatrix) |
| 51 | : fLocalMatrix(localMatrix ? *localMatrix : SkMatrix::I()) { |
commit-bot@chromium.org | 8fae213 | 2014-05-07 22:26:37 +0000 | [diff] [blame] | 52 | inc_shader_counter(); |
mtklein | 435eba7 | 2014-12-01 12:06:24 -0800 | [diff] [blame] | 53 | // Pre-cache so future calls to fLocalMatrix.getType() are threadsafe. |
| 54 | (void)fLocalMatrix.getType(); |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 55 | } |
| 56 | |
Florin Malita | 4aed138 | 2017-05-25 10:38:07 -0400 | [diff] [blame] | 57 | SkShaderBase::~SkShaderBase() { |
commit-bot@chromium.org | 8fae213 | 2014-05-07 22:26:37 +0000 | [diff] [blame] | 58 | dec_shader_counter(); |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 59 | } |
| 60 | |
Florin Malita | 4aed138 | 2017-05-25 10:38:07 -0400 | [diff] [blame] | 61 | void SkShaderBase::flatten(SkWriteBuffer& buffer) const { |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 62 | this->INHERITED::flatten(buffer); |
commit-bot@chromium.org | 5970f62 | 2014-05-12 20:42:21 +0000 | [diff] [blame] | 63 | bool hasLocalM = !fLocalMatrix.isIdentity(); |
bsalomon@google.com | f94b3a4 | 2012-10-31 18:09:01 +0000 | [diff] [blame] | 64 | buffer.writeBool(hasLocalM); |
| 65 | if (hasLocalM) { |
| 66 | buffer.writeMatrix(fLocalMatrix); |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 67 | } |
| 68 | } |
| 69 | |
Florin Malita | 4aed138 | 2017-05-25 10:38:07 -0400 | [diff] [blame] | 70 | bool SkShaderBase::computeTotalInverse(const SkMatrix& ctm, |
| 71 | const SkMatrix* outerLocalMatrix, |
| 72 | SkMatrix* totalInverse) const { |
Florin Malita | 26368c3 | 2017-05-08 13:03:24 -0400 | [diff] [blame] | 73 | SkMatrix total = SkMatrix::Concat(ctm, fLocalMatrix); |
| 74 | if (outerLocalMatrix) { |
| 75 | total.preConcat(*outerLocalMatrix); |
commit-bot@chromium.org | 80116dc | 2014-05-06 17:16:03 +0000 | [diff] [blame] | 76 | } |
Florin Malita | bbeb573 | 2017-01-26 16:23:06 -0500 | [diff] [blame] | 77 | |
| 78 | return total.invert(totalInverse); |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 79 | } |
| 80 | |
Florin Malita | 4aed138 | 2017-05-25 10:38:07 -0400 | [diff] [blame] | 81 | bool SkShaderBase::asLuminanceColor(SkColor* colorPtr) const { |
reed | 8367b8c | 2014-08-22 08:30:20 -0700 | [diff] [blame] | 82 | SkColor storage; |
halcanary | 96fcdcc | 2015-08-27 07:41:13 -0700 | [diff] [blame] | 83 | if (nullptr == colorPtr) { |
reed | 8367b8c | 2014-08-22 08:30:20 -0700 | [diff] [blame] | 84 | colorPtr = &storage; |
| 85 | } |
| 86 | if (this->onAsLuminanceColor(colorPtr)) { |
| 87 | *colorPtr = SkColorSetA(*colorPtr, 0xFF); // we only return opaque |
| 88 | return true; |
| 89 | } |
| 90 | return false; |
| 91 | } |
| 92 | |
Florin Malita | 4aed138 | 2017-05-25 10:38:07 -0400 | [diff] [blame] | 93 | SkShaderBase::Context* SkShaderBase::makeContext(const ContextRec& rec, SkArenaAlloc* alloc) const { |
Florin Malita | 8b9566a | 2017-07-05 10:59:12 -0400 | [diff] [blame] | 94 | return this->computeTotalInverse(*rec.fMatrix, rec.fLocalMatrix, nullptr) |
| 95 | ? this->onMakeContext(rec, alloc) |
| 96 | : nullptr; |
commit-bot@chromium.org | f3e5059 | 2014-04-30 23:29:02 +0000 | [diff] [blame] | 97 | } |
| 98 | |
Florin Malita | 47e55a5 | 2017-06-06 12:26:54 -0400 | [diff] [blame] | 99 | SkShaderBase::Context* SkShaderBase::makeBurstPipelineContext(const ContextRec& rec, |
| 100 | SkArenaAlloc* alloc) const { |
| 101 | |
| 102 | SkASSERT(rec.fPreferredDstType == ContextRec::kPM4f_DstType); |
| 103 | |
Florin Malita | 5769dd2 | 2017-07-12 13:31:25 -0400 | [diff] [blame] | 104 | // Always use vanilla stages for perspective. |
| 105 | if (rec.fMatrix->hasPerspective() || fLocalMatrix.hasPerspective()) { |
| 106 | return nullptr; |
| 107 | } |
| 108 | |
Florin Malita | 8b9566a | 2017-07-05 10:59:12 -0400 | [diff] [blame] | 109 | return this->computeTotalInverse(*rec.fMatrix, rec.fLocalMatrix, nullptr) |
| 110 | ? this->onMakeBurstPipelineContext(rec, alloc) |
| 111 | : nullptr; |
Florin Malita | 47e55a5 | 2017-06-06 12:26:54 -0400 | [diff] [blame] | 112 | } |
| 113 | |
Florin Malita | 4aed138 | 2017-05-25 10:38:07 -0400 | [diff] [blame] | 114 | SkShaderBase::Context::Context(const SkShaderBase& shader, const ContextRec& rec) |
commit-bot@chromium.org | 80116dc | 2014-05-06 17:16:03 +0000 | [diff] [blame] | 115 | : fShader(shader), fCTM(*rec.fMatrix) |
commit-bot@chromium.org | 87fcd95 | 2014-04-23 19:10:51 +0000 | [diff] [blame] | 116 | { |
Florin Malita | 7d022e0 | 2017-05-15 15:06:39 -0400 | [diff] [blame] | 117 | // We should never use a context for RP-only shaders. |
Mike Reed | 3404207 | 2017-08-08 16:29:22 -0400 | [diff] [blame] | 118 | SkASSERT(!shader.isRasterPipelineOnly(*rec.fMatrix)); |
Florin Malita | 5769dd2 | 2017-07-12 13:31:25 -0400 | [diff] [blame] | 119 | // ... or for perspective. |
| 120 | SkASSERT(!rec.fMatrix->hasPerspective()); |
| 121 | SkASSERT(!rec.fLocalMatrix || !rec.fLocalMatrix->hasPerspective()); |
Florin Malita | 7d022e0 | 2017-05-15 15:06:39 -0400 | [diff] [blame] | 122 | |
commit-bot@chromium.org | 87fcd95 | 2014-04-23 19:10:51 +0000 | [diff] [blame] | 123 | // Because the context parameters must be valid at this point, we know that the matrix is |
| 124 | // invertible. |
Florin Malita | 26368c3 | 2017-05-08 13:03:24 -0400 | [diff] [blame] | 125 | SkAssertResult(fShader.computeTotalInverse(*rec.fMatrix, rec.fLocalMatrix, &fTotalInverse)); |
commit-bot@chromium.org | 87fcd95 | 2014-04-23 19:10:51 +0000 | [diff] [blame] | 126 | |
commit-bot@chromium.org | e901b6d | 2014-05-01 19:31:31 +0000 | [diff] [blame] | 127 | fPaintAlpha = rec.fPaint->getAlpha(); |
commit-bot@chromium.org | 87fcd95 | 2014-04-23 19:10:51 +0000 | [diff] [blame] | 128 | } |
| 129 | |
Florin Malita | 4aed138 | 2017-05-25 10:38:07 -0400 | [diff] [blame] | 130 | SkShaderBase::Context::~Context() {} |
commit-bot@chromium.org | 87fcd95 | 2014-04-23 19:10:51 +0000 | [diff] [blame] | 131 | |
Florin Malita | 4aed138 | 2017-05-25 10:38:07 -0400 | [diff] [blame] | 132 | void SkShaderBase::Context::shadeSpan4f(int x, int y, SkPM4f dst[], int count) { |
reed | a34be68 | 2016-02-15 07:48:35 -0800 | [diff] [blame] | 133 | const int N = 128; |
| 134 | SkPMColor tmp[N]; |
| 135 | while (count > 0) { |
| 136 | int n = SkTMin(count, N); |
| 137 | this->shadeSpan(x, y, tmp, n); |
| 138 | for (int i = 0; i < n; ++i) { |
| 139 | dst[i] = SkPM4f::FromPMColor(tmp[i]); |
| 140 | } |
| 141 | dst += n; |
| 142 | x += n; |
| 143 | count -= n; |
| 144 | } |
reed | 6d3cef9 | 2016-01-22 01:04:29 -0800 | [diff] [blame] | 145 | } |
| 146 | |
Florin Malita | 4aed138 | 2017-05-25 10:38:07 -0400 | [diff] [blame] | 147 | const SkMatrix& SkShader::getLocalMatrix() const { |
| 148 | return as_SB(this)->getLocalMatrix(); |
| 149 | } |
| 150 | |
| 151 | #ifdef SK_SUPPORT_LEGACY_SHADER_ISABITMAP |
| 152 | bool SkShader::isABitmap(SkBitmap* outTexture, SkMatrix* outMatrix, TileMode xy[2]) const { |
| 153 | return as_SB(this)->onIsABitmap(outTexture, outMatrix, xy); |
| 154 | } |
| 155 | #endif |
| 156 | |
| 157 | SkImage* SkShader::isAImage(SkMatrix* localMatrix, TileMode xy[2]) const { |
| 158 | return as_SB(this)->onIsAImage(localMatrix, xy); |
| 159 | } |
| 160 | |
vandebo@chromium.org | d3ae779 | 2011-02-24 00:21:06 +0000 | [diff] [blame] | 161 | SkShader::GradientType SkShader::asAGradient(GradientInfo* info) const { |
| 162 | return kNone_GradientType; |
| 163 | } |
| 164 | |
bungeman | 06ca8ec | 2016-06-09 08:01:03 -0700 | [diff] [blame] | 165 | #if SK_SUPPORT_GPU |
Brian Salomon | aff329b | 2017-08-11 09:40:37 -0400 | [diff] [blame] | 166 | std::unique_ptr<GrFragmentProcessor> SkShaderBase::asFragmentProcessor(const AsFPArgs&) const { |
bsalomon | c21b09e | 2015-08-28 18:46:56 -0700 | [diff] [blame] | 167 | return nullptr; |
rileya@google.com | 03c1c35 | 2012-07-20 20:02:43 +0000 | [diff] [blame] | 168 | } |
bungeman | 06ca8ec | 2016-06-09 08:01:03 -0700 | [diff] [blame] | 169 | #endif |
rileya@google.com | 03c1c35 | 2012-07-20 20:02:43 +0000 | [diff] [blame] | 170 | |
Florin Malita | d93e11c | 2017-05-24 21:15:46 +0000 | [diff] [blame] | 171 | sk_sp<SkShader> SkShader::makeAsALocalMatrixShader(SkMatrix*) const { |
halcanary | 96fcdcc | 2015-08-27 07:41:13 -0700 | [diff] [blame] | 172 | return nullptr; |
commit-bot@chromium.org | 8fae213 | 2014-05-07 22:26:37 +0000 | [diff] [blame] | 173 | } |
| 174 | |
reed | 8a21c9f | 2016-03-08 18:50:00 -0800 | [diff] [blame] | 175 | sk_sp<SkShader> SkShader::MakeEmptyShader() { return sk_make_sp<SkEmptyShader>(); } |
commit-bot@chromium.org | ce56d96 | 2014-05-05 18:39:18 +0000 | [diff] [blame] | 176 | |
reed | 8a21c9f | 2016-03-08 18:50:00 -0800 | [diff] [blame] | 177 | sk_sp<SkShader> SkShader::MakeColorShader(SkColor color) { return sk_make_sp<SkColorShader>(color); } |
reed | 8367b8c | 2014-08-22 08:30:20 -0700 | [diff] [blame] | 178 | |
reed | 8a21c9f | 2016-03-08 18:50:00 -0800 | [diff] [blame] | 179 | sk_sp<SkShader> SkShader::MakeBitmapShader(const SkBitmap& src, TileMode tmx, TileMode tmy, |
| 180 | const SkMatrix* localMatrix) { |
Florin Malita | 8d3ffad | 2017-02-03 18:21:17 +0000 | [diff] [blame] | 181 | if (localMatrix && !localMatrix->invert(nullptr)) { |
| 182 | return nullptr; |
| 183 | } |
Herb Derby | bfdc87a | 2017-02-14 15:06:23 +0000 | [diff] [blame] | 184 | return SkMakeBitmapShader(src, tmx, tmy, localMatrix, kIfMutable_SkCopyPixelsMode); |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 185 | } |
| 186 | |
reed | 7fb4f8b | 2016-03-11 04:33:52 -0800 | [diff] [blame] | 187 | sk_sp<SkShader> SkShader::MakePictureShader(sk_sp<SkPicture> src, TileMode tmx, TileMode tmy, |
reed | 8a21c9f | 2016-03-08 18:50:00 -0800 | [diff] [blame] | 188 | const SkMatrix* localMatrix, const SkRect* tile) { |
Florin Malita | 8d3ffad | 2017-02-03 18:21:17 +0000 | [diff] [blame] | 189 | if (localMatrix && !localMatrix->invert(nullptr)) { |
| 190 | return nullptr; |
| 191 | } |
reed | 8a21c9f | 2016-03-08 18:50:00 -0800 | [diff] [blame] | 192 | return SkPictureShader::Make(std::move(src), tmx, tmy, localMatrix, tile); |
commit-bot@chromium.org | c5d9bb0 | 2014-04-08 15:19:34 +0000 | [diff] [blame] | 193 | } |
| 194 | |
commit-bot@chromium.org | 0f10f7b | 2014-03-13 18:02:17 +0000 | [diff] [blame] | 195 | #ifndef SK_IGNORE_TO_STRING |
Florin Malita | 4aed138 | 2017-05-25 10:38:07 -0400 | [diff] [blame] | 196 | void SkShaderBase::toString(SkString* str) const { |
commit-bot@chromium.org | 5970f62 | 2014-05-12 20:42:21 +0000 | [diff] [blame] | 197 | if (!fLocalMatrix.isIdentity()) { |
robertphillips@google.com | 76f9e93 | 2013-01-15 20:17:47 +0000 | [diff] [blame] | 198 | str->append(" "); |
commit-bot@chromium.org | 5970f62 | 2014-05-12 20:42:21 +0000 | [diff] [blame] | 199 | fLocalMatrix.toString(str); |
robertphillips@google.com | 76f9e93 | 2013-01-15 20:17:47 +0000 | [diff] [blame] | 200 | } |
| 201 | } |
| 202 | #endif |
| 203 | |
Mike Reed | 1d8c42e | 2017-08-29 14:58:19 -0400 | [diff] [blame] | 204 | bool SkShaderBase::appendStages(const StageRec& rec) const { |
| 205 | return this->onAppendStages(rec); |
Florin Malita | 9206c76 | 2017-01-30 12:08:05 -0500 | [diff] [blame] | 206 | } |
| 207 | |
Mike Reed | 1d8c42e | 2017-08-29 14:58:19 -0400 | [diff] [blame] | 208 | bool SkShaderBase::onAppendStages(const StageRec& rec) const { |
Mike Reed | 6867eee | 2017-06-02 13:25:15 -0400 | [diff] [blame] | 209 | // SkShader::Context::shadeSpan4f() handles the paint opacity internally, |
| 210 | // but SkRasterPipelineBlitter applies it as a separate stage. |
| 211 | // We skip the internal shadeSpan4f() step by forcing the paint opaque. |
Mike Reed | 1d8c42e | 2017-08-29 14:58:19 -0400 | [diff] [blame] | 212 | SkTCopyOnFirstWrite<SkPaint> opaquePaint(rec.fPaint); |
| 213 | if (rec.fPaint.getAlpha() != SK_AlphaOPAQUE) { |
Mike Reed | 6867eee | 2017-06-02 13:25:15 -0400 | [diff] [blame] | 214 | opaquePaint.writable()->setAlpha(SK_AlphaOPAQUE); |
| 215 | } |
| 216 | |
Mike Reed | 1d8c42e | 2017-08-29 14:58:19 -0400 | [diff] [blame] | 217 | ContextRec cr(*opaquePaint, rec.fCTM, rec.fLocalM, ContextRec::kPM4f_DstType, rec.fDstCS); |
Mike Reed | 6867eee | 2017-06-02 13:25:15 -0400 | [diff] [blame] | 218 | |
| 219 | struct CallbackCtx : SkJumper_CallbackCtx { |
| 220 | sk_sp<SkShader> shader; |
| 221 | Context* ctx; |
| 222 | }; |
Mike Reed | 1d8c42e | 2017-08-29 14:58:19 -0400 | [diff] [blame] | 223 | auto cb = rec.fAlloc->make<CallbackCtx>(); |
| 224 | cb->shader = rec.fDstCS ? SkColorSpaceXformer::Make(sk_ref_sp(rec.fDstCS))->apply(this) |
| 225 | : sk_ref_sp((SkShader*)this); |
| 226 | cb->ctx = as_SB(cb->shader)->makeContext(cr, rec.fAlloc); |
Mike Reed | 6867eee | 2017-06-02 13:25:15 -0400 | [diff] [blame] | 227 | cb->fn = [](SkJumper_CallbackCtx* self, int active_pixels) { |
| 228 | auto c = (CallbackCtx*)self; |
| 229 | int x = (int)c->rgba[0], |
| 230 | y = (int)c->rgba[1]; |
| 231 | c->ctx->shadeSpan4f(x,y, (SkPM4f*)c->rgba, active_pixels); |
| 232 | }; |
| 233 | |
| 234 | if (cb->ctx) { |
Mike Klein | 85f8536 | 2017-10-17 14:22:58 -0400 | [diff] [blame] | 235 | rec.fPipeline->append_seed_shader(); |
Mike Reed | 1d8c42e | 2017-08-29 14:58:19 -0400 | [diff] [blame] | 236 | rec.fPipeline->append(SkRasterPipeline::callback, cb); |
Mike Reed | 6867eee | 2017-06-02 13:25:15 -0400 | [diff] [blame] | 237 | return true; |
| 238 | } |
Mike Klein | 44d3279 | 2017-05-10 12:29:38 -0400 | [diff] [blame] | 239 | return false; |
| 240 | } |
| 241 | |
reed | 0ccc62d | 2016-05-04 13:09:39 -0700 | [diff] [blame] | 242 | /////////////////////////////////////////////////////////////////////////////////////////////////// |
reed | 830dfd8 | 2016-03-16 12:29:01 -0700 | [diff] [blame] | 243 | |
reed | 60c9b58 | 2016-04-03 09:11:13 -0700 | [diff] [blame] | 244 | sk_sp<SkFlattenable> SkEmptyShader::CreateProc(SkReadBuffer&) { |
| 245 | return SkShader::MakeEmptyShader(); |
reed | 9fa60da | 2014-08-21 07:59:51 -0700 | [diff] [blame] | 246 | } |
| 247 | |
commit-bot@chromium.org | 87fcd95 | 2014-04-23 19:10:51 +0000 | [diff] [blame] | 248 | #ifndef SK_IGNORE_TO_STRING |
reed@google.com | 37a2012 | 2011-07-05 18:54:12 +0000 | [diff] [blame] | 249 | #include "SkEmptyShader.h" |
| 250 | |
robertphillips@google.com | 76f9e93 | 2013-01-15 20:17:47 +0000 | [diff] [blame] | 251 | void SkEmptyShader::toString(SkString* str) const { |
| 252 | str->append("SkEmptyShader: ("); |
| 253 | |
| 254 | this->INHERITED::toString(str); |
| 255 | |
| 256 | str->append(")"); |
| 257 | } |
| 258 | #endif |