Fix uninitialized memory read in BitmapCopy test with A1 config

https://codereview.chromium.org/26890002/



git-svn-id: http://skia.googlecode.com/svn/trunk@11722 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/BitmapCopyTest.cpp b/tests/BitmapCopyTest.cpp
index 38453c8..009e8b1 100644
--- a/tests/BitmapCopyTest.cpp
+++ b/tests/BitmapCopyTest.cpp
@@ -57,6 +57,10 @@
     if (bitmap.getPixels()) {
         if (bitmap.getColorTable()) {
             sk_bzero(bitmap.getPixels(), bitmap.getSize());
+        } else if (SkBitmap::kA1_Config == bitmap.config()) {
+            // The A1 config can have uninitialized bits at the
+            // end of each row if eraseColor is used
+            memset(bitmap.getPixels(), 0xff, bitmap.getSafeSize());
         } else {
             bitmap.eraseColor(SK_ColorWHITE);
         }