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

Unified Diff: third_party/WebKit/Source/platform/SharedBuffer.cpp

Issue 2206263003: Remove SK_SUPPORT_LEGACY_DATA_FACTORIES. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ref when needed. 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: third_party/WebKit/Source/platform/SharedBuffer.cpp
diff --git a/third_party/WebKit/Source/platform/SharedBuffer.cpp b/third_party/WebKit/Source/platform/SharedBuffer.cpp
index 7cec8ed221397e9dee8c19ac1a08cdddfb70cdd7..02006e7a8524b17776d8169fec914f4cc4eebf4f 100644
--- a/third_party/WebKit/Source/platform/SharedBuffer.cpp
+++ b/third_party/WebKit/Source/platform/SharedBuffer.cpp
@@ -261,10 +261,10 @@ bool SharedBuffer::getAsBytesInternal(void* dest, size_t byteLength) const
return true;
}
-PassRefPtr<SkData> SharedBuffer::getAsSkData() const
+sk_sp<SkData> SharedBuffer::getAsSkData() const
{
size_t bufferLength = size();
- SkData* data = SkData::NewUninitialized(bufferLength);
+ sk_sp<SkData> data = SkData::MakeUninitialized(bufferLength);
char* buffer = static_cast<char*>(data->writable_data());
const char* segment = 0;
size_t position = 0;
@@ -278,7 +278,7 @@ PassRefPtr<SkData> SharedBuffer::getAsSkData() const
// Don't return the incomplete SkData.
return nullptr;
}
- return adoptRef(data);
+ return data;
}
bool SharedBuffer::lock()
« no previous file with comments | « third_party/WebKit/Source/platform/SharedBuffer.h ('k') | third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698