Index: src/image/SkImage_Raster.cpp |
diff --git a/src/image/SkImage_Raster.cpp b/src/image/SkImage_Raster.cpp |
index 192a4e03eccbc2eed4ca54e23117f17b35bb2e73..645a3db64b31b97d981501d3b72c4ae544256294 100644 |
--- a/src/image/SkImage_Raster.cpp |
+++ b/src/image/SkImage_Raster.cpp |
@@ -254,7 +254,7 @@ sk_sp<SkImage> SkMakeImageFromPixelRef(const SkImageInfo& info, SkPixelRef* pr, |
return sk_make_sp<SkImage_Raster>(info, pr, pixelRefOrigin, rowBytes); |
} |
-sk_sp<SkImage> SkMakeImageFromRasterBitmap(const SkBitmap& bm, ForceCopyMode forceCopy) { |
+sk_sp<SkImage> SkMakeImageFromRasterBitmap(const SkBitmap& bm, SkCopyPixelsMode cpm) { |
bool hasColorTable = false; |
if (kIndex_8_SkColorType == bm.colorType()) { |
SkAutoLockPixels autoLockPixels(bm); |
@@ -266,9 +266,7 @@ sk_sp<SkImage> SkMakeImageFromRasterBitmap(const SkBitmap& bm, ForceCopyMode for |
} |
sk_sp<SkImage> image; |
- if (kYes_ForceCopyMode == forceCopy || |
- (!bm.isImmutable() && kNever_ForceCopyMode != forceCopy)) |
- { |
+ if (kAlways_SkCopyPixelsMode == cpm || (!bm.isImmutable() && kNever_SkCopyPixelsMode != cpm)) { |
SkBitmap tmp(bm); |
tmp.lockPixels(); |
SkPixmap pmap; |
@@ -276,7 +274,7 @@ sk_sp<SkImage> SkMakeImageFromRasterBitmap(const SkBitmap& bm, ForceCopyMode for |
image = SkImage::MakeRasterCopy(pmap); |
} |
} else { |
- image = sk_make_sp<SkImage_Raster>(bm, kNever_ForceCopyMode == forceCopy); |
+ image = sk_make_sp<SkImage_Raster>(bm, kNever_SkCopyPixelsMode == cpm); |
} |
return image; |
} |