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

Unified Diff: src/codec/SkWbmpCodec.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: src/codec/SkWbmpCodec.cpp
diff --git a/src/codec/SkWbmpCodec.cpp b/src/codec/SkWbmpCodec.cpp
index 326fc2206a082b6d6bd6d897d8f4cce12c11c1fd..099b6e472a9e9f2087d05b56fbd0b0fe30609677 100644
--- a/src/codec/SkWbmpCodec.cpp
+++ b/src/codec/SkWbmpCodec.cpp
@@ -155,8 +155,7 @@ SkCodec::Result SkWbmpCodec::onGetPixels(const SkImageInfo& info,
}
bool SkWbmpCodec::IsWbmp(const void* buffer, size_t bytesRead) {
- SkAutoTUnref<SkData> data(SkData::NewWithoutCopy(buffer, bytesRead));
- SkMemoryStream stream(data);
+ SkMemoryStream stream(buffer, bytesRead, false);
return read_header(&stream, nullptr);
}

Powered by Google App Engine
This is Rietveld 408576698