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

Unified Diff: third_party/WebKit/Source/platform/image-decoders/ImageFrame.cpp

Issue 1880993003: Use RefPtr for SkBitmap::Allocator in ImageDecoder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sharedBufferInterface6
Patch Set: Rebase to ToT Created 4 years, 8 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 | « third_party/WebKit/Source/platform/image-decoders/ImageFrame.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/image-decoders/ImageFrame.cpp
diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageFrame.cpp b/third_party/WebKit/Source/platform/image-decoders/ImageFrame.cpp
index 1390439648a4bbd767300fe45c3ee736ab1ead0f..47f41060695d502f5f779f74a54c300870bfdee1 100644
--- a/third_party/WebKit/Source/platform/image-decoders/ImageFrame.cpp
+++ b/third_party/WebKit/Source/platform/image-decoders/ImageFrame.cpp
@@ -29,8 +29,7 @@
namespace blink {
ImageFrame::ImageFrame()
- : m_allocator(0)
- , m_hasAlpha(true)
+ : m_hasAlpha(true)
, m_status(FrameEmpty)
, m_duration(0)
, m_disposalMethod(DisposeNotSpecified)
@@ -53,7 +52,7 @@ ImageFrame& ImageFrame::operator=(const ImageFrame& other)
// Be sure to assign this before calling setStatus(), since setStatus() may
// call notifyBitmapIfPixelsChanged().
m_pixelsChanged = other.m_pixelsChanged;
- setMemoryAllocator(other.allocator());
+ m_allocator = other.m_allocator;
setOriginalFrameRect(other.originalFrameRect());
setStatus(other.getStatus());
setDuration(other.duration());
@@ -100,7 +99,7 @@ bool ImageFrame::setSize(int newWidth, int newHeight)
m_bitmap.setInfo(SkImageInfo::MakeN32(newWidth, newHeight,
m_premultiplyAlpha ? kPremul_SkAlphaType : kUnpremul_SkAlphaType));
- if (!m_bitmap.tryAllocPixels(m_allocator, 0))
+ if (!m_bitmap.tryAllocPixels(m_allocator.get(), 0))
return false;
zeroFillPixelData();
« no previous file with comments | « third_party/WebKit/Source/platform/image-decoders/ImageFrame.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698