| scroggo@google.com | d5764e8 | 2012-08-22 15:00:05 +0000 | [diff] [blame] | 1 | |
| 2 | /* |
| 3 | * Copyright 2012 Google Inc. |
| 4 | * |
| 5 | * Use of this source code is governed by a BSD-style license that can be |
| 6 | * found in the LICENSE file. |
| 7 | */ |
| 8 | |
| scroggo@google.com | 825bb95 | 2012-08-22 15:14:43 +0000 | [diff] [blame] | 9 | #if SK_SUPPORT_GPU |
| 10 | |
| scroggo@google.com | d5764e8 | 2012-08-22 15:00:05 +0000 | [diff] [blame] | 11 | #include "GrContext.h" |
| bsalomon@google.com | 67b915d | 2013-02-04 16:13:32 +0000 | [diff] [blame] | 12 | #include "GrContextFactory.h" |
| scroggo@google.com | d5764e8 | 2012-08-22 15:00:05 +0000 | [diff] [blame] | 13 | #include "SkBitmap.h" |
| scroggo@google.com | a2a3192 | 2012-12-07 19:14:45 +0000 | [diff] [blame] | 14 | #include "SkCanvas.h" |
| 15 | #include "SkColor.h" |
| scroggo@google.com | d5764e8 | 2012-08-22 15:00:05 +0000 | [diff] [blame] | 16 | #include "SkGpuDevice.h" |
| scroggo@google.com | a2a3192 | 2012-12-07 19:14:45 +0000 | [diff] [blame] | 17 | #include "SkPaint.h" |
| scroggo@google.com | d5764e8 | 2012-08-22 15:00:05 +0000 | [diff] [blame] | 18 | #include "SkPixelRef.h" |
| 19 | #include "SkRect.h" |
| 20 | #include "Test.h" |
| 21 | |
| commit-bot@chromium.org | d5f032d | 2014-02-24 18:51:43 +0000 | [diff] [blame] | 22 | struct Pair { |
| 23 | SkColorType fColorType; |
| 24 | const char* fValid; |
| 25 | }; |
| 26 | |
| 27 | #ifdef SK_SUPPORT_DEEPCOPYTO_CONFIG |
| scroggo@google.com | d5764e8 | 2012-08-22 15:00:05 +0000 | [diff] [blame] | 28 | static const char* boolStr(bool value) { |
| 29 | return value ? "true" : "false"; |
| 30 | } |
| 31 | |
| 32 | // these are in the same order as the SkBitmap::Config enum |
| commit-bot@chromium.org | 8a2ad3c | 2014-02-23 03:59:35 +0000 | [diff] [blame] | 33 | static const char* gColorTypeName[] = { |
| reed@google.com | 6ba4572 | 2013-06-21 18:30:53 +0000 | [diff] [blame] | 34 | "None", "8888" |
| scroggo@google.com | d5764e8 | 2012-08-22 15:00:05 +0000 | [diff] [blame] | 35 | }; |
| 36 | |
| scroggo@google.com | a2a3192 | 2012-12-07 19:14:45 +0000 | [diff] [blame] | 37 | /** |
| 38 | * Check to ensure that copying a GPU-backed SkBitmap behaved as expected. |
| 39 | * @param reporter Used to report failures. |
| commit-bot@chromium.org | 8a2ad3c | 2014-02-23 03:59:35 +0000 | [diff] [blame] | 40 | * @param desiredCT colorType being copied to. If the copy succeeded, dst must have this Config. |
| scroggo@google.com | a2a3192 | 2012-12-07 19:14:45 +0000 | [diff] [blame] | 41 | * @param success True if the copy succeeded. |
| 42 | * @param src A GPU-backed SkBitmap that had copyTo or deepCopyTo called on it. |
| 43 | * @param dst SkBitmap that was copied to. |
| scroggo@google.com | 5ccae2c | 2014-01-15 16:56:52 +0000 | [diff] [blame] | 44 | * @param expectSameGenID Whether the genIDs should be the same if success is true. |
| scroggo@google.com | a2a3192 | 2012-12-07 19:14:45 +0000 | [diff] [blame] | 45 | */ |
| commit-bot@chromium.org | 8a2ad3c | 2014-02-23 03:59:35 +0000 | [diff] [blame] | 46 | static void TestIndividualCopy(skiatest::Reporter* reporter, const SkColorType desiredCT, |
| scroggo@google.com | a2a3192 | 2012-12-07 19:14:45 +0000 | [diff] [blame] | 47 | const bool success, const SkBitmap& src, const SkBitmap& dst, |
| scroggo@google.com | 5ccae2c | 2014-01-15 16:56:52 +0000 | [diff] [blame] | 48 | const bool expectSameGenID) { |
| scroggo@google.com | a2a3192 | 2012-12-07 19:14:45 +0000 | [diff] [blame] | 49 | if (success) { |
| 50 | REPORTER_ASSERT(reporter, src.width() == dst.width()); |
| 51 | REPORTER_ASSERT(reporter, src.height() == dst.height()); |
| commit-bot@chromium.org | 8a2ad3c | 2014-02-23 03:59:35 +0000 | [diff] [blame] | 52 | REPORTER_ASSERT(reporter, dst.colorType() == desiredCT); |
| scroggo@google.com | a2a3192 | 2012-12-07 19:14:45 +0000 | [diff] [blame] | 53 | if (src.config() == dst.config()) { |
| scroggo@google.com | 5ccae2c | 2014-01-15 16:56:52 +0000 | [diff] [blame] | 54 | if (expectSameGenID) { |
| scroggo@google.com | a2a3192 | 2012-12-07 19:14:45 +0000 | [diff] [blame] | 55 | REPORTER_ASSERT(reporter, src.getGenerationID() == dst.getGenerationID()); |
| scroggo@google.com | 5ccae2c | 2014-01-15 16:56:52 +0000 | [diff] [blame] | 56 | } else { |
| 57 | REPORTER_ASSERT(reporter, src.getGenerationID() != dst.getGenerationID()); |
| scroggo@google.com | a2a3192 | 2012-12-07 19:14:45 +0000 | [diff] [blame] | 58 | } |
| 59 | REPORTER_ASSERT(reporter, src.pixelRef() != NULL && dst.pixelRef() != NULL); |
| 60 | |
| 61 | // Do read backs and make sure that the two are the same. |
| 62 | SkBitmap srcReadBack, dstReadBack; |
| 63 | { |
| 64 | SkASSERT(src.getTexture() != NULL); |
| scroggo@google.com | 5ccae2c | 2014-01-15 16:56:52 +0000 | [diff] [blame] | 65 | const SkIPoint origin = src.pixelRefOrigin(); |
| 66 | const SkIRect subset = SkIRect::MakeXYWH(origin.fX, origin.fY, |
| 67 | src.width(), src.height()); |
| 68 | bool readBack = src.pixelRef()->readPixels(&srcReadBack, &subset); |
| scroggo@google.com | a2a3192 | 2012-12-07 19:14:45 +0000 | [diff] [blame] | 69 | REPORTER_ASSERT(reporter, readBack); |
| 70 | } |
| 71 | if (dst.getTexture() != NULL) { |
| scroggo@google.com | 5ccae2c | 2014-01-15 16:56:52 +0000 | [diff] [blame] | 72 | const SkIPoint origin = dst.pixelRefOrigin(); |
| 73 | const SkIRect subset = SkIRect::MakeXYWH(origin.fX, origin.fY, |
| 74 | dst.width(), dst.height()); |
| 75 | bool readBack = dst.pixelRef()->readPixels(&dstReadBack, &subset); |
| scroggo@google.com | a2a3192 | 2012-12-07 19:14:45 +0000 | [diff] [blame] | 76 | REPORTER_ASSERT(reporter, readBack); |
| 77 | } else { |
| 78 | // If dst is not a texture, do a copy instead, to the same config as srcReadBack. |
| commit-bot@chromium.org | 8a2ad3c | 2014-02-23 03:59:35 +0000 | [diff] [blame] | 79 | bool copy = dst.copyTo(&dstReadBack, srcReadBack.colorType()); |
| scroggo@google.com | a2a3192 | 2012-12-07 19:14:45 +0000 | [diff] [blame] | 80 | REPORTER_ASSERT(reporter, copy); |
| 81 | } |
| 82 | |
| 83 | SkAutoLockPixels srcLock(srcReadBack); |
| 84 | SkAutoLockPixels dstLock(dstReadBack); |
| 85 | REPORTER_ASSERT(reporter, srcReadBack.readyToDraw() && dstReadBack.readyToDraw()); |
| 86 | |
| 87 | const char* srcP = static_cast<const char*>(srcReadBack.getAddr(0, 0)); |
| 88 | const char* dstP = static_cast<const char*>(dstReadBack.getAddr(0, 0)); |
| 89 | REPORTER_ASSERT(reporter, srcP != dstP); |
| 90 | |
| 91 | REPORTER_ASSERT(reporter, !memcmp(srcP, dstP, srcReadBack.getSize())); |
| 92 | } else { |
| 93 | REPORTER_ASSERT(reporter, src.getGenerationID() != dst.getGenerationID()); |
| 94 | } |
| scroggo@google.com | a2a3192 | 2012-12-07 19:14:45 +0000 | [diff] [blame] | 95 | } else { |
| 96 | // dst should be unchanged from its initial state |
| 97 | REPORTER_ASSERT(reporter, dst.config() == SkBitmap::kNo_Config); |
| 98 | REPORTER_ASSERT(reporter, dst.width() == 0); |
| 99 | REPORTER_ASSERT(reporter, dst.height() == 0); |
| 100 | } |
| 101 | |
| 102 | } |
| commit-bot@chromium.org | d5f032d | 2014-02-24 18:51:43 +0000 | [diff] [blame] | 103 | #endif |
| scroggo@google.com | a2a3192 | 2012-12-07 19:14:45 +0000 | [diff] [blame] | 104 | |
| scroggo@google.com | d5764e8 | 2012-08-22 15:00:05 +0000 | [diff] [blame] | 105 | // Stripped down version of TestBitmapCopy that checks basic fields (width, height, config, genID) |
| 106 | // to ensure that they were copied properly. |
| tfarina@chromium.org | 4ee16bf | 2014-01-10 22:08:27 +0000 | [diff] [blame] | 107 | DEF_GPUTEST(GpuBitmapCopy, reporter, factory) { |
| bsalomon@google.com | 7f805ff | 2012-12-10 17:32:07 +0000 | [diff] [blame] | 108 | #ifdef SK_BUILD_FOR_ANDROID // https://code.google.com/p/skia/issues/detail?id=753 |
| 109 | return; |
| 110 | #endif |
| bsalomon@google.com | 67b915d | 2013-02-04 16:13:32 +0000 | [diff] [blame] | 111 | for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) { |
| 112 | GrContextFactory::GLContextType glType = static_cast<GrContextFactory::GLContextType>(type); |
| 113 | if (!GrContextFactory::IsRenderingGLContext(glType)) { |
| 114 | continue; |
| 115 | } |
| scroggo@google.com | d5764e8 | 2012-08-22 15:00:05 +0000 | [diff] [blame] | 116 | |
| bsalomon@google.com | 67b915d | 2013-02-04 16:13:32 +0000 | [diff] [blame] | 117 | GrContext* grContext = factory->get(glType); |
| 118 | if (NULL == grContext) { |
| 119 | continue; |
| scroggo@google.com | a2a3192 | 2012-12-07 19:14:45 +0000 | [diff] [blame] | 120 | } |
| 121 | |
| scroggo@google.com | d5764e8 | 2012-08-22 15:00:05 +0000 | [diff] [blame] | 122 | |
| bsalomon@google.com | 67b915d | 2013-02-04 16:13:32 +0000 | [diff] [blame] | 123 | if (NULL == grContext) { |
| 124 | return; |
| 125 | } |
| 126 | static const Pair gPairs[] = { |
| commit-bot@chromium.org | 15a1405 | 2014-02-16 00:59:25 +0000 | [diff] [blame] | 127 | // SkGpuDevice can no longer be Create()ed with kNo_Config |
| 128 | // (or kUnknown_SkColorType in the new world), hence much of this |
| 129 | // test will be skipped, since it was checking that calling |
| 130 | // copyTo or deepCopyTo with src or dst set to kUnknown/kNo would |
| 131 | // successfully fail. |
| 132 | // |
| 133 | // If we can declare that you can *never* create a texture with |
| 134 | // kUnknown, then perhaps we can remove this entire test... |
| 135 | // |
| 136 | // { SkBitmap::kNo_Config, "00" }, |
| 137 | // { SkBitmap::kARGB_8888_Config, "01" }, |
| commit-bot@chromium.org | 8a2ad3c | 2014-02-23 03:59:35 +0000 | [diff] [blame] | 138 | { kPMColor_SkColorType, "1" }, |
| bsalomon@google.com | 67b915d | 2013-02-04 16:13:32 +0000 | [diff] [blame] | 139 | }; |
| scroggo@google.com | d5764e8 | 2012-08-22 15:00:05 +0000 | [diff] [blame] | 140 | |
| bsalomon@google.com | 67b915d | 2013-02-04 16:13:32 +0000 | [diff] [blame] | 141 | const int W = 20; |
| 142 | const int H = 33; |
| scroggo@google.com | a2a3192 | 2012-12-07 19:14:45 +0000 | [diff] [blame] | 143 | |
| bsalomon@google.com | 67b915d | 2013-02-04 16:13:32 +0000 | [diff] [blame] | 144 | for (size_t i = 0; i < SK_ARRAY_COUNT(gPairs); i++) { |
| commit-bot@chromium.org | 15a1405 | 2014-02-16 00:59:25 +0000 | [diff] [blame] | 145 | SkImageInfo info = SkImageInfo::Make(W, H, |
| commit-bot@chromium.org | 8a2ad3c | 2014-02-23 03:59:35 +0000 | [diff] [blame] | 146 | gPairs[i].fColorType, |
| commit-bot@chromium.org | 15a1405 | 2014-02-16 00:59:25 +0000 | [diff] [blame] | 147 | kPremul_SkAlphaType); |
| bsalomon@google.com | 67b915d | 2013-02-04 16:13:32 +0000 | [diff] [blame] | 148 | SkBitmap src, dst; |
| 149 | |
| commit-bot@chromium.org | 15a1405 | 2014-02-16 00:59:25 +0000 | [diff] [blame] | 150 | SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(grContext, info, 0)); |
| 151 | SkASSERT(device.get()); |
| 152 | |
| bsalomon@google.com | 67b915d | 2013-02-04 16:13:32 +0000 | [diff] [blame] | 153 | src = device->accessBitmap(false); |
| 154 | device->clear(SK_ColorWHITE); |
| 155 | |
| 156 | // Draw something different to the same portion of the bitmap that we will extract as a |
| 157 | // subset, so that comparing the pixels of the subset will be meaningful. |
| 158 | SkIRect subsetRect = SkIRect::MakeLTRB(W/2, H/2, W, H); |
| 159 | SkCanvas drawingCanvas(device); |
| 160 | SkPaint paint; |
| 161 | paint.setColor(SK_ColorRED); |
| reed@google.com | 4469938 | 2013-10-31 17:28:30 +0000 | [diff] [blame] | 162 | drawingCanvas.drawRect(SkRect::Make(subsetRect), paint); |
| bsalomon@google.com | 67b915d | 2013-02-04 16:13:32 +0000 | [diff] [blame] | 163 | |
| 164 | // Extract a subset. If this succeeds we will test copying the subset. |
| 165 | SkBitmap subset; |
| commit-bot@chromium.org | 6285f4f | 2014-02-20 19:08:07 +0000 | [diff] [blame] | 166 | #ifdef SK_SUPPORT_DEEPCOPYTO_CONFIG |
| bsalomon@google.com | 67b915d | 2013-02-04 16:13:32 +0000 | [diff] [blame] | 167 | const bool extracted = src.extractSubset(&subset, subsetRect); |
| bsalomon@google.com | 67b915d | 2013-02-04 16:13:32 +0000 | [diff] [blame] | 168 | |
| 169 | for (size_t j = 0; j < SK_ARRAY_COUNT(gPairs); j++) { |
| commit-bot@chromium.org | 8a2ad3c | 2014-02-23 03:59:35 +0000 | [diff] [blame] | 170 | SkBitmap::Config pairsConfig = SkColorTypeToBitmapConfig(gPairs[j].fColorType); |
| bsalomon@google.com | 67b915d | 2013-02-04 16:13:32 +0000 | [diff] [blame] | 171 | dst.reset(); |
| commit-bot@chromium.org | 8a2ad3c | 2014-02-23 03:59:35 +0000 | [diff] [blame] | 172 | bool success = src.deepCopyTo(&dst, pairsConfig); |
| bsalomon@google.com | 67b915d | 2013-02-04 16:13:32 +0000 | [diff] [blame] | 173 | bool expected = gPairs[i].fValid[j] != '0'; |
| 174 | if (success != expected) { |
| halcanary@google.com | a9325fa | 2014-01-10 14:58:10 +0000 | [diff] [blame] | 175 | ERRORF(reporter, "SkBitmap::deepCopyTo from %s to %s. " |
| commit-bot@chromium.org | 8a2ad3c | 2014-02-23 03:59:35 +0000 | [diff] [blame] | 176 | "expected %s returned %s", gColorTypeName[i], |
| 177 | gColorTypeName[j], boolStr(expected), |
| halcanary@google.com | a9325fa | 2014-01-10 14:58:10 +0000 | [diff] [blame] | 178 | boolStr(success)); |
| bsalomon@google.com | 67b915d | 2013-02-04 16:13:32 +0000 | [diff] [blame] | 179 | } |
| 180 | |
| commit-bot@chromium.org | 8a2ad3c | 2014-02-23 03:59:35 +0000 | [diff] [blame] | 181 | bool canSucceed = src.canCopyTo(gPairs[j].fColorType); |
| bsalomon@google.com | 67b915d | 2013-02-04 16:13:32 +0000 | [diff] [blame] | 182 | if (success != canSucceed) { |
| halcanary@google.com | a9325fa | 2014-01-10 14:58:10 +0000 | [diff] [blame] | 183 | ERRORF(reporter, "SkBitmap::deepCopyTo from %s to %s " |
| 184 | "returned %s, but canCopyTo returned %s", |
| commit-bot@chromium.org | 8a2ad3c | 2014-02-23 03:59:35 +0000 | [diff] [blame] | 185 | gColorTypeName[i], gColorTypeName[j], boolStr(success), |
| halcanary@google.com | a9325fa | 2014-01-10 14:58:10 +0000 | [diff] [blame] | 186 | boolStr(canSucceed)); |
| bsalomon@google.com | 67b915d | 2013-02-04 16:13:32 +0000 | [diff] [blame] | 187 | } |
| 188 | |
| commit-bot@chromium.org | 8a2ad3c | 2014-02-23 03:59:35 +0000 | [diff] [blame] | 189 | TestIndividualCopy(reporter, gPairs[j].fColorType, success, src, dst, true); |
| bsalomon@google.com | 67b915d | 2013-02-04 16:13:32 +0000 | [diff] [blame] | 190 | |
| 191 | // Test copying the subset bitmap, using both copyTo and deepCopyTo. |
| 192 | if (extracted) { |
| 193 | SkBitmap subsetCopy; |
| commit-bot@chromium.org | 8a2ad3c | 2014-02-23 03:59:35 +0000 | [diff] [blame] | 194 | success = subset.copyTo(&subsetCopy, gPairs[j].fColorType); |
| bsalomon@google.com | 67b915d | 2013-02-04 16:13:32 +0000 | [diff] [blame] | 195 | REPORTER_ASSERT(reporter, success == expected); |
| 196 | REPORTER_ASSERT(reporter, success == canSucceed); |
| commit-bot@chromium.org | 8a2ad3c | 2014-02-23 03:59:35 +0000 | [diff] [blame] | 197 | TestIndividualCopy(reporter, gPairs[j].fColorType, success, subset, subsetCopy, |
| scroggo@google.com | 5ccae2c | 2014-01-15 16:56:52 +0000 | [diff] [blame] | 198 | true); |
| bsalomon@google.com | 67b915d | 2013-02-04 16:13:32 +0000 | [diff] [blame] | 199 | |
| 200 | // Reset the bitmap so that a failed copyTo will leave it in the expected state. |
| 201 | subsetCopy.reset(); |
| commit-bot@chromium.org | 8a2ad3c | 2014-02-23 03:59:35 +0000 | [diff] [blame] | 202 | success = subset.deepCopyTo(&subsetCopy, pairsConfig); |
| bsalomon@google.com | 67b915d | 2013-02-04 16:13:32 +0000 | [diff] [blame] | 203 | REPORTER_ASSERT(reporter, success == expected); |
| 204 | REPORTER_ASSERT(reporter, success == canSucceed); |
| commit-bot@chromium.org | 8a2ad3c | 2014-02-23 03:59:35 +0000 | [diff] [blame] | 205 | TestIndividualCopy(reporter, gPairs[j].fColorType, success, subset, subsetCopy, |
| scroggo@google.com | 9349101 | 2013-02-05 19:22:27 +0000 | [diff] [blame] | 206 | true); |
| scroggo@google.com | 5ccae2c | 2014-01-15 16:56:52 +0000 | [diff] [blame] | 207 | |
| 208 | // Now set a bitmap to be a subset that will share the same pixelref. |
| 209 | // This allows testing another case of cloning the genID. When calling copyTo |
| 210 | // on a bitmap representing a subset of its pixelref, the resulting pixelref |
| 211 | // should not share the genID, since we only copied the subset. |
| 212 | SkBitmap trueSubset; |
| 213 | // FIXME: Once https://codereview.chromium.org/109023008/ lands, call |
| 214 | // trueSubset.installPixelRef(src.pixelRef(), subset); |
| commit-bot@chromium.org | 8a2ad3c | 2014-02-23 03:59:35 +0000 | [diff] [blame] | 215 | trueSubset.setConfig(SkImageInfo::Make(W/2, H/2, gPairs[i].fColorType, |
| 216 | kPremul_SkAlphaType)); |
| scroggo@google.com | 5ccae2c | 2014-01-15 16:56:52 +0000 | [diff] [blame] | 217 | trueSubset.setPixelRef(src.pixelRef(), W/2, H/2); |
| 218 | |
| 219 | subsetCopy.reset(); |
| commit-bot@chromium.org | 8a2ad3c | 2014-02-23 03:59:35 +0000 | [diff] [blame] | 220 | success = trueSubset.copyTo(&subsetCopy, gPairs[j].fColorType); |
| scroggo@google.com | 5ccae2c | 2014-01-15 16:56:52 +0000 | [diff] [blame] | 221 | REPORTER_ASSERT(reporter, success == expected); |
| 222 | REPORTER_ASSERT(reporter, success == canSucceed); |
| commit-bot@chromium.org | 8a2ad3c | 2014-02-23 03:59:35 +0000 | [diff] [blame] | 223 | TestIndividualCopy(reporter, gPairs[j].fColorType, success, trueSubset, subsetCopy, |
| scroggo@google.com | 5ccae2c | 2014-01-15 16:56:52 +0000 | [diff] [blame] | 224 | false); |
| 225 | |
| 226 | // deepCopyTo copies the entire pixelref, even if the bitmap only represents |
| 227 | // a subset. Therefore, the result should share the same genID. |
| 228 | subsetCopy.reset(); |
| commit-bot@chromium.org | 8a2ad3c | 2014-02-23 03:59:35 +0000 | [diff] [blame] | 229 | success = trueSubset.deepCopyTo(&subsetCopy, pairsConfig); |
| scroggo@google.com | 5ccae2c | 2014-01-15 16:56:52 +0000 | [diff] [blame] | 230 | REPORTER_ASSERT(reporter, success == expected); |
| 231 | REPORTER_ASSERT(reporter, success == canSucceed); |
| commit-bot@chromium.org | 8a2ad3c | 2014-02-23 03:59:35 +0000 | [diff] [blame] | 232 | TestIndividualCopy(reporter, gPairs[j].fColorType, success, trueSubset, subsetCopy, |
| scroggo@google.com | 5ccae2c | 2014-01-15 16:56:52 +0000 | [diff] [blame] | 233 | true); |
| bsalomon@google.com | 67b915d | 2013-02-04 16:13:32 +0000 | [diff] [blame] | 234 | } |
| 235 | } // for (size_t j = ... |
| commit-bot@chromium.org | 6285f4f | 2014-02-20 19:08:07 +0000 | [diff] [blame] | 236 | #endif |
| bsalomon@google.com | 67b915d | 2013-02-04 16:13:32 +0000 | [diff] [blame] | 237 | } // for (size_t i = ... |
| 238 | } // GrContextFactory::GLContextType |
| scroggo@google.com | d5764e8 | 2012-08-22 15:00:05 +0000 | [diff] [blame] | 239 | } |
| 240 | |
| scroggo@google.com | 825bb95 | 2012-08-22 15:14:43 +0000 | [diff] [blame] | 241 | #endif |