Replace use of SkBitmap::eraseRGB with eraseColor.
authorBen Wagner <bungeman@google.com>
Thu, 16 Feb 2017 18:59:09 +0000 (13:59 -0500)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Thu, 16 Feb 2017 20:50:23 +0000 (20:50 +0000)
SkBitmap::eraseRGB is marked as deprecated. After this CL the code
should have the exact same behavior as previously, but without calling
the deprecated function. The presence of this deprecated call is
causing extra warnings in the iOS build.

Change-Id: I0770ca0a7e9884e7122f431a9ed2d3fdb2bbd6f8
Reviewed-on: https://skia-review.googlesource.com/8581
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>

gm/simple_magnification.cpp

index 402a7de..4acd774 100644 (file)
@@ -31,7 +31,7 @@ static sk_sp<SkImage> make_image(GrContext* context, int size, GrSurfaceOrigin o
     } else {
         SkBitmap bm;
         bm.allocN32Pixels(size, size);
-        bm.eraseRGB(255, 0, 0);
+        bm.eraseColor(SK_ColorRED);
         *bm.getAddr32(1, 1) = SkPackARGB32(0xFF, 0x00, 0xFF, 0x00);
         *bm.getAddr32(2, 1) = SkPackARGB32(0xFF, 0x00, 0x00, 0xFF);
         *bm.getAddr32(1, 2) = SkPackARGB32(0xFF, 0x00, 0xFF, 0xFF);