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

Unified Diff: tools/debugger/SkDrawCommand.cpp

Issue 2206633004: Move off SK_SUPPORT_LEGACY_DATA_FACTORIES. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Gotta catch 'em all. Created 4 years, 4 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
Index: tools/debugger/SkDrawCommand.cpp
diff --git a/tools/debugger/SkDrawCommand.cpp b/tools/debugger/SkDrawCommand.cpp
index 51eb96706af25e34250f127eb819021b202840e7..362325085c4c628aa5f41b4ca7e0a3d56f399ca6 100644
--- a/tools/debugger/SkDrawCommand.cpp
+++ b/tools/debugger/SkDrawCommand.cpp
@@ -609,8 +609,8 @@ static void store_bool(Json::Value* target, const char* key, bool value, bool de
static void encode_data(const void* bytes, size_t count, const char* contentType,
UrlDataManager& urlDataManager, Json::Value* target) {
- SkAutoTUnref<SkData> data(SkData::NewWithCopy(bytes, count));
- SkString url = urlDataManager.addData(data, contentType);
+ sk_sp<SkData> data(SkData::MakeWithCopy(bytes, count));
+ SkString url = urlDataManager.addData(data.get(), contentType);
*target = Json::Value(url.c_str());
}
@@ -821,7 +821,7 @@ static SkBitmap* load_bitmap(const Json::Value& jsonBitmap, UrlDataManager& urlD
}
const void* data;
int size = decode_data(jsonBitmap[SKDEBUGCANVAS_ATTRIBUTE_DATA], urlDataManager, &data);
- sk_sp<SkData> encoded(SkData::NewWithoutCopy(data, size));
+ sk_sp<SkData> encoded(SkData::MakeWithoutCopy(data, size));
sk_sp<SkImage> image(SkImage::MakeFromEncoded(std::move(encoded), nullptr));
SkAutoTDelete<SkBitmap> bitmap(new SkBitmap());
« include/core/SkData.h ('K') | « tools/Resources.cpp ('k') | tools/fiddle/fiddle_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698