diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-21 21:08:14 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-21 21:08:14 +0000 |
commit | 2c4e75cc3c0302e0e151d90c74b4c476bfa8a8b5 (patch) | |
tree | 31f9c18cd261ca0afed29436b2a116e51e5c77e6 /dm | |
parent | 855e88edfafe4b3892e99f932c38fa7433b2fcbe (diff) |
Remove offset to SkMallocPixelRef::NewWithData - use SkData::NewSubset instead.
R=scroggo@google.com, mtklein@google.com, reed@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/243483002
git-svn-id: http://skia.googlecode.com/svn/trunk@14289 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'dm')
-rw-r--r-- | dm/DMWriteTask.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dm/DMWriteTask.cpp b/dm/DMWriteTask.cpp index 890a4bb052..f7fa014ea4 100644 --- a/dm/DMWriteTask.cpp +++ b/dm/DMWriteTask.cpp @@ -84,8 +84,11 @@ struct PngAndRaw { } const size_t offset = data->size() - bitmapBytes; + SkAutoTUnref<SkData> subset( + SkData::NewSubset(data, offset, bitmapBytes)); SkAutoTUnref<SkPixelRef> pixels( - SkMallocPixelRef::NewWithData(info, rowBytes, NULL/*ctable*/, data, offset)); + SkMallocPixelRef::NewWithData( + info, rowBytes, NULL/*ctable*/, subset)); SkASSERT(pixels); bitmap->setConfig(info, rowBytes); |