From 0db38ccfefcfb45d1542678cc45415f2d2b01c85 Mon Sep 17 00:00:00 2001 From: halcanary Date: Thu, 17 Jul 2014 10:17:28 -0700 Subject: [PATCH] erase bitmap inside unit test to make valgrind happier R=mtklein@google.com TBR=sunshine Author: halcanary@google.com Review URL: https://codereview.chromium.org/397273006 --- tests/ScaledImageCache.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/ScaledImageCache.cpp b/tests/ScaledImageCache.cpp index 2040afe..9515e13 100644 --- a/tests/ScaledImageCache.cpp +++ b/tests/ScaledImageCache.cpp @@ -17,6 +17,7 @@ static size_t test_scaled_image_cache_useage() { SkCanvas::NewRasterN32(kCanvasSize, kCanvasSize)); SkBitmap bitmap; SkAssertResult(bitmap.allocN32Pixels(kBitmapSize, kBitmapSize)); + bitmap.eraseColor(0xFFFFFFFF); SkScalar scaledSize = SkIntToScalar(kScale * kBitmapSize); canvas->clipRect(SkRect::MakeLTRB(0, 0, scaledSize, scaledSize)); SkPaint paint; -- 2.7.4