diff options
author | Matt Sarett <msarett@google.com> | 2017-04-27 12:45:45 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-27 17:18:03 +0000 |
commit | d4a338f4d0a0cdc08d7d3668931c60997f0fa971 (patch) | |
tree | 676fe5dcd3d19c14c5bf091243cadea35ebef205 /src/utils | |
parent | 9fa99614ec4e695f6e7e9fe19508758757543b8c (diff) |
Delete copyTo(Allocator), hide copyTo() behind flag
Replace uses of copyTo() in Skia.
Bug: skia:6464
Change-Id: I921dc53a1c29a5176d18f05741f7c0b5a008e548
Reviewed-on: https://skia-review.googlesource.com/14502
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/mac/SkCreateCGImageRef.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/utils/mac/SkCreateCGImageRef.cpp b/src/utils/mac/SkCreateCGImageRef.cpp index 880c566c73..b5df42364b 100644 --- a/src/utils/mac/SkCreateCGImageRef.cpp +++ b/src/utils/mac/SkCreateCGImageRef.cpp @@ -110,9 +110,10 @@ static SkBitmap* prepareForImageRef(const SkBitmap& bm, SkBitmap* copy; if (upscaleTo32) { copy = new SkBitmap; - // here we make a ceep copy of the pixels, since CG won't take our + // here we make a deep copy of the pixels, since CG won't take our // 565 directly - bm.copyTo(copy, kN32_SkColorType); + copy->allocPixels(bm.info().makeColorType(kN32_SkColorType)); + bm.readPixels(copy->info(), copy->getPixels(), copy->rowBytes(), 0, 0); } else { copy = new SkBitmap(bm); } |