diff --git a/include/core/SkColorPriv.h b/include/core/SkColorPriv.h index ba1230adb3..9591f22725 100644 --- a/include/core/SkColorPriv.h +++ b/include/core/SkColorPriv.h @@ -102,7 +102,7 @@ // no need to pass in the colortype to this function. static inline uint32_t SkSwizzle_RB(uint32_t c) { static const uint32_t kRBMask = (0xFF << SK_R32_SHIFT) | (0xFF << SK_B32_SHIFT); - + unsigned c0 = (c >> SK_R32_SHIFT) & 0xFF; unsigned c1 = (c >> SK_B32_SHIFT) & 0xFF; return (c & ~kRBMask) | (c0 << SK_B32_SHIFT) | (c1 << SK_R32_SHIFT); diff --git a/include/gpu/SkGpuDevice.h b/include/gpu/SkGpuDevice.h index 3e20e1610a..cabbe07dec 100644 --- a/include/gpu/SkGpuDevice.h +++ b/include/gpu/SkGpuDevice.h @@ -30,13 +30,13 @@ class GrTextContext; class SK_API SkGpuDevice : public SkBitmapDevice { public: enum Flags { - kNeedClear_Flag = 1 << 0, //!< Surface requires an initial clear + kNeedClear_Flag = 1 << 0, //!< Surface requires an initial clear kCached_Flag = 1 << 1, //!< Surface is cached and needs to be unlocked when released }; /** * Creates an SkGpuDevice from a GrSurface. This will fail if the surface is not a render - * target. The caller owns a ref on the returned device. If the surface is cached, + * target. The caller owns a ref on the returned device. If the surface is cached, * the kCached_Flag should be specified to make the device responsible for unlocking * the surface when it is released. */ diff --git a/src/core/SkConfig8888.cpp b/src/core/SkConfig8888.cpp index 54a1ca9e41..189309dae6 100644 --- a/src/core/SkConfig8888.cpp +++ b/src/core/SkConfig8888.cpp @@ -13,7 +13,7 @@ template uint32_t convert32(uint32_t c) { if (doSwapRB) { c = SkSwizzle_RB(c); } - + // Lucky for us, in both RGBA and BGRA, the alpha component is always in the same place, so // we can perform premul or unpremul the same way without knowing the swizzles for RGB. switch (doAlpha) { @@ -115,4 +115,3 @@ bool SkSrcPixelInfo::convertPixelsTo(SkDstPixelInfo* dst, int width, int height) } return true; } - diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index bc7ff503f0..ba53a48725 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -1411,13 +1411,13 @@ bool GrContext::readRenderTargetPixels(GrRenderTarget* target, dstPI.fAlphaType = kUnpremul_SkAlphaType; dstPI.fPixels = buffer; dstPI.fRowBytes = rowBytes; - + SkSrcPixelInfo srcPI; srcPI.fColorType = swapRAndB ? toggle_colortype32(dstPI.fColorType) : dstPI.fColorType; srcPI.fAlphaType = kPremul_SkAlphaType; srcPI.fPixels = buffer; srcPI.fRowBytes = rowBytes; - + return srcPI.convertPixelsTo(&dstPI, width, height); } return true; @@ -1556,7 +1556,7 @@ bool GrContext::writeRenderTargetPixels(GrRenderTarget* target, if (!srcPI.convertPixelsTo(&dstPI, width, height)) { return false; } - + buffer = tmpPixels.get(); rowBytes = 4 * width; } diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp index 1ad99bb728..db46b86901 100644 --- a/src/gpu/SkGr.cpp +++ b/src/gpu/SkGr.cpp @@ -41,7 +41,7 @@ static void build_compressed_data(void* buffer, const SkBitmap& bitmap) { dstPI.fAlphaType = kPremul_SkAlphaType; dstPI.fPixels = buffer; dstPI.fRowBytes = count * sizeof(SkPMColor); - + SkSrcPixelInfo srcPI; srcPI.fColorType = kPMColor_SkColorType; srcPI.fAlphaType = kPremul_SkAlphaType; diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp index c0839a5038..705ea14989 100644 --- a/tests/SurfaceTest.cpp +++ b/tests/SurfaceTest.cpp @@ -324,13 +324,13 @@ static void TestSurfaceInCache(skiatest::Reporter* reporter, REPORTER_ASSERT(reporter, expectedCachedResources == context->getGpuTextureCacheResourceCount()); // Verify that all the cached resources are locked in cache. - context->freeGpuResources(); + context->freeGpuResources(); REPORTER_ASSERT(reporter, expectedCachedResources == context->getGpuTextureCacheResourceCount()); // Verify that all the cached resources are unlocked upon surface release surface.reset(0); context->freeGpuResources(); - REPORTER_ASSERT(reporter, 0 == context->getGpuTextureCacheResourceCount()); + REPORTER_ASSERT(reporter, 0 == context->getGpuTextureCacheResourceCount()); } static void Test_crbug263329(skiatest::Reporter* reporter, diff --git a/tests/WritePixelsTest.cpp b/tests/WritePixelsTest.cpp index 087012739c..5562331fc3 100644 --- a/tests/WritePixelsTest.cpp +++ b/tests/WritePixelsTest.cpp @@ -190,7 +190,7 @@ static bool checkWrite(skiatest::Reporter* reporter, SkCanvas* canvas, const SkB SkImageInfo canvasInfo; size_t canvasRowBytes; const uint32_t* canvasPixels; - + // Can't use canvas->peekPixels(), as we are trying to look at GPU pixels sometimes as well. // At some point this will be unsupported, as we won't allow accessBitmap() to magically call // readPixels for the client. @@ -441,7 +441,7 @@ DEF_GPUTEST(WritePixels, reporter, factory) { for (size_t c = 0; c < SK_ARRAY_COUNT(gSrcConfigs); ++c) { const SkColorType ct = gSrcConfigs[c].fColorType; const SkAlphaType at = gSrcConfigs[c].fAlphaType; - + fillCanvas(&canvas); SkBitmap bmp; REPORTER_ASSERT(reporter, setupBitmap(&bmp, ct, at, rect.width(),