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

Unified Diff: src/effects/SkTableColorFilter.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/SkPixelXorXfermode.cpp ('k') | src/effects/SkTableMaskFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkTableColorFilter.cpp
diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp
index 4ce0b4bb0ee4fb0e4b4b0678a64269634176e520..10b71f86c61bbe8d6b5bf2bb3f397e207a9cbdef 100644
--- a/src/effects/SkTableColorFilter.cpp
+++ b/src/effects/SkTableColorFilter.cpp
@@ -207,7 +207,7 @@ void SkTable_ColorFilter::flatten(SkWriteBuffer& buffer) const {
buffer.writeByteArray(storage, size);
}
-SkFlattenable* SkTable_ColorFilter::CreateProc(SkReadBuffer& buffer) {
+sk_sp<SkFlattenable> SkTable_ColorFilter::CreateProc(SkReadBuffer& buffer) {
const int flags = buffer.read32();
const size_t count = gCountNibBits[flags & 0xF];
SkASSERT(count <= 4);
@@ -251,7 +251,7 @@ SkFlattenable* SkTable_ColorFilter::CreateProc(SkReadBuffer& buffer) {
b = ptr;
ptr += 256;
}
- return SkTableColorFilter::MakeARGB(a, r, g, b).release();
+ return SkTableColorFilter::MakeARGB(a, r, g, b);
}
bool SkTable_ColorFilter::asComponentTable(SkBitmap* table) const {
« no previous file with comments | « src/effects/SkPixelXorXfermode.cpp ('k') | src/effects/SkTableMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698