Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Unified Diff: dm/DMWriteTask.cpp

Issue 243483002: Remove offset to SkMallocPixelRef::NewWithData - use SkData::NewSubset instead. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: AnotherPatchSet Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | include/core/SkMallocPixelRef.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMWriteTask.cpp
diff --git a/dm/DMWriteTask.cpp b/dm/DMWriteTask.cpp
index 890a4bb052b719e096fd51bd15eb2212a22ce6b6..f7fa014ea45880a78ab9dd66d43b80ccc8750a4b 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);
« no previous file with comments | « no previous file | include/core/SkMallocPixelRef.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698