diff options
author | Matt Sarett <msarett@google.com> | 2017-04-27 20:08:39 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-27 20:08:45 +0000 |
commit | 0122af08f6af0dee490e1a4f35b552377d0d4753 (patch) | |
tree | dc2a227b525f067fe8c837cc8d4c5c3480cb69de /tools/debugger | |
parent | 4b32ab1b7cac09f42b0867f6c63cd8656dd9918d (diff) |
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>
Diffstat (limited to 'tools/debugger')
-rw-r--r-- | tools/debugger/SkDrawCommand.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/debugger/SkDrawCommand.cpp b/tools/debugger/SkDrawCommand.cpp index 23cc6b21f8..e386f46f22 100644 --- a/tools/debugger/SkDrawCommand.cpp +++ b/tools/debugger/SkDrawCommand.cpp @@ -837,9 +837,7 @@ static SkBitmap* convert_colortype(SkBitmap* bitmap, SkColorType colorType) { return bitmap; } SkBitmap* dst = new SkBitmap(); - if (dst->tryAllocPixels(bitmap->info().makeColorType(colorType)) && - bitmap->readPixels(dst->info(), dst->getPixels(), dst->rowBytes(), 0, 0)) - { + if (bitmap->copyTo(dst, colorType)) { delete bitmap; return dst; } |