aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2014-07-17 10:17:28 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-07-17 10:17:28 -0700
commit0db38ccfefcfb45d1542678cc45415f2d2b01c85 (patch)
treea2c10845ebff383ba81d5de8a69c00cd835aeb0e /tests
parent3125e02062b9d42df706208d3465834673748c34 (diff)
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
Diffstat (limited to 'tests')
-rw-r--r--tests/ScaledImageCache.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/ScaledImageCache.cpp b/tests/ScaledImageCache.cpp
index 2040afea27..9515e134e4 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;