diff options
author | Matt Sarett <msarett@google.com> | 2017-04-28 11:15:22 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-28 15:49:04 +0000 |
commit | 68b8e3d50d0954eb5eeb7f625f06026c7fbd38c1 (patch) | |
tree | 3bfd232ad1dab38ea06fffdd761ea24d016be337 /src/utils | |
parent | 0acd7954a9e654d7e9c11a532eeeeb2f18a76152 (diff) |
Revert "Revert "Delete copyTo(Allocator), hide copyTo() behind flag""
This reverts commit 0122af08f6af0dee490e1a4f35b552377d0d4753.
Reason for revert: Fixed Android callsite
Original change's description:
> Revert "Delete copyTo(Allocator), hide copyTo() behind flag"
>
> This reverts commit d4a338f4d0a0cdc08d7d3668931c60997f0fa971.
>
> Reason for revert: Looks like I missed something I was supposed to delete in Android.
>
> Original change's description:
> > 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>
> >
>
> TBR=msarett@google.com,reed@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Change-Id: I4d252940cc6a2462b030007055ea6c229471fc6e
> Reviewed-on: https://skia-review.googlesource.com/14602
> Reviewed-by: Matt Sarett <msarett@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>
>
TBR=msarett@google.com,reviews@skia.org,reed@google.com
Change-Id: I81659a820f79f1958fda23cb62513065b57db99d
Reviewed-on: https://skia-review.googlesource.com/14640
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@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); } |