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

Unified Diff: third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h

Issue 2326473005: Use sk_sp<SkBitmap::Allocator> instead of raw pointers or WTF::RefPtr<T>. (Closed)
Patch Set: Created 4 years, 3 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/image-decoders/ImageDecoder.h
diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
index 51c81a37251705429adeecc8aa2a694606ffd686..a6c6f0848ba4990aff6fb3d796fe7f057159b134 100644
--- a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
+++ b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
@@ -258,7 +258,7 @@ public:
// and returns true. Otherwise returns false.
virtual bool hotSpot(IntPoint&) const { return false; }
- virtual void setMemoryAllocator(SkBitmap::Allocator* allocator)
+ virtual void setMemoryAllocator(sk_sp<SkBitmap::Allocator> allocator)
{
// FIXME: this doesn't work for images with multiple frames.
if (m_frameBufferCache.isEmpty()) {
@@ -266,7 +266,7 @@ public:
m_frameBufferCache[0].setRequiredPreviousFrameIndex(
findRequiredPreviousFrame(0, false));
}
- m_frameBufferCache[0].setMemoryAllocator(allocator);
+ m_frameBufferCache[0].setMemoryAllocator(std::move(allocator));
}
virtual bool canDecodeToYUV() { return false; }

Powered by Google App Engine
This is Rietveld 408576698