diff options
author | 2014-02-23 03:59:35 +0000 | |
---|---|---|
committer | 2014-02-23 03:59:35 +0000 | |
commit | 8a2ad3cae710f05cca57e48dd1732d575dba2dc7 (patch) | |
tree | 65d3463543af4bc3d330de2bef37cffc6d10395e /src/utils | |
parent | d5b294acad96ffa3ccb5c56f6290036922f76907 (diff) |
add new copyTo version to SkBitmap, which takes SkColorType
BUG=skia:
R=scroggo@google.com, halcanary@google.com, bsalomon@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/171723007
git-svn-id: http://skia.googlecode.com/svn/trunk@13553 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/SkBitmapHasher.cpp | 2 | ||||
-rw-r--r-- | src/utils/mac/SkCreateCGImageRef.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/SkBitmapHasher.cpp b/src/utils/SkBitmapHasher.cpp index 9f0affdea7..6c861cd04b 100644 --- a/src/utils/SkBitmapHasher.cpp +++ b/src/utils/SkBitmapHasher.cpp @@ -57,7 +57,7 @@ static inline uint64_t first_8_bytes_as_uint64(const uint8_t *bytearray) { // Hmm, that didn't work. Maybe if we create a new // kARGB_8888_Config version of the bitmap it will work better? SkBitmap copyBitmap; - if (!bitmap.copyTo(©Bitmap, SkBitmap::kARGB_8888_Config)) { + if (!bitmap.copyTo(©Bitmap, kPMColor_SkColorType)) { return false; } return ComputeDigestInternal(copyBitmap, result); diff --git a/src/utils/mac/SkCreateCGImageRef.cpp b/src/utils/mac/SkCreateCGImageRef.cpp index 01f2dacdda..7687c3c7e4 100644 --- a/src/utils/mac/SkCreateCGImageRef.cpp +++ b/src/utils/mac/SkCreateCGImageRef.cpp @@ -94,7 +94,7 @@ static SkBitmap* prepareForImageRef(const SkBitmap& bm, copy = new SkBitmap; // here we make a ceep copy of the pixels, since CG won't take our // 565 directly - bm.copyTo(copy, SkBitmap::kARGB_8888_Config); + bm.copyTo(copy, kPMColor_SkColorType); } else { copy = new SkBitmap(bm); } |