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

Unified Diff: src/effects/SkTableMaskFilter.cpp

Issue 1855733002: change flattenable factory to return sk_sp (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/effects/SkTableColorFilter.cpp ('k') | src/effects/SkTestImageFilters.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkTableMaskFilter.cpp
diff --git a/src/effects/SkTableMaskFilter.cpp b/src/effects/SkTableMaskFilter.cpp
index ddf9f33f54265fef4fdc9a74b6e9e26233998d32..d83465296212fa5ed7c498fb98a3127b35a1653b 100644
--- a/src/effects/SkTableMaskFilter.cpp
+++ b/src/effects/SkTableMaskFilter.cpp
@@ -73,12 +73,12 @@ void SkTableMaskFilter::flatten(SkWriteBuffer& wb) const {
wb.writeByteArray(fTable, 256);
}
-SkFlattenable* SkTableMaskFilter::CreateProc(SkReadBuffer& buffer) {
+sk_sp<SkFlattenable> SkTableMaskFilter::CreateProc(SkReadBuffer& buffer) {
uint8_t table[256];
if (!buffer.readByteArray(table, 256)) {
return nullptr;
}
- return Create(table);
+ return sk_sp<SkFlattenable>(Create(table));
}
///////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « src/effects/SkTableColorFilter.cpp ('k') | src/effects/SkTestImageFilters.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698