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

Unified Diff: src/core/SkBitmap.cpp

Issue 1779263003: Make sp variants for SkData (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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 | « src/c/sk_surface.cpp ('k') | src/core/SkData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmap.cpp
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index fdb66b378bea45fadbea5114524ed549a77a7f90..7e8e62e88b2c684adb5573a782da5cd06c47d73a 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -1163,7 +1163,7 @@ bool SkBitmap::ReadRawPixels(SkReadBuffer* buffer, SkBitmap* bitmap) {
return false;
}
- SkAutoDataUnref data(SkData::NewUninitialized(SkToSizeT(ramSize)));
+ sk_sp<SkData> data(SkData::MakeUninitialized(SkToSizeT(ramSize)));
unsigned char* dst = (unsigned char*)data->writable_data();
buffer->readByteArray(dst, SkToSizeT(snugSize));
« no previous file with comments | « src/c/sk_surface.cpp ('k') | src/core/SkData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698