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

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

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
Index: third_party/WebKit/Source/platform/image-decoders/ImageFrame.h
diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageFrame.h b/third_party/WebKit/Source/platform/image-decoders/ImageFrame.h
index 7a51c75e23dfa7f6aa20ba419fc6ded626c89d71..d0317a8d3f0c873fbcd0a321a2242da0208d21c5 100644
--- a/third_party/WebKit/Source/platform/image-decoders/ImageFrame.h
+++ b/third_party/WebKit/Source/platform/image-decoders/ImageFrame.h
@@ -120,7 +120,6 @@ public:
DisposalMethod getDisposalMethod() const { return m_disposalMethod; }
AlphaBlendSource getAlphaBlendSource() const { return m_alphaBlendSource; }
bool premultiplyAlpha() const { return m_premultiplyAlpha; }
- SkBitmap::Allocator* allocator() const { return m_allocator; }
const SkBitmap& bitmap() const { return m_bitmap; }
// Returns true if the pixels changed, but the bitmap has not yet been notified.
bool pixelsChanged() const { return m_pixelsChanged; }
@@ -132,7 +131,7 @@ public:
void setDisposalMethod(DisposalMethod disposalMethod) { m_disposalMethod = disposalMethod; }
void setAlphaBlendSource(AlphaBlendSource alphaBlendSource) { m_alphaBlendSource = alphaBlendSource; }
void setPremultiplyAlpha(bool premultiplyAlpha) { m_premultiplyAlpha = premultiplyAlpha; }
- void setMemoryAllocator(SkBitmap::Allocator* allocator) { m_allocator = allocator; }
+ void setMemoryAllocator(PassRefPtr<SkBitmap::Allocator> allocator) { m_allocator = allocator; }
// The pixelsChanged flag needs to be set when the raw pixel data was directly modified
// (e.g. through a pointer or setRGBA). The flag is usually set after a batch of changes was made.
void setPixelsChanged(bool pixelsChanged) { m_pixelsChanged = pixelsChanged; }
@@ -197,7 +196,7 @@ private:
SkAlphaType computeAlphaType() const;
SkBitmap m_bitmap;
- SkBitmap::Allocator* m_allocator;
+ RefPtr<SkBitmap::Allocator> m_allocator;
bool m_hasAlpha;
// This will always just be the entire buffer except for GIF or WebP
// frames whose original rect was smaller than the overall image size.

Powered by Google App Engine
This is Rietveld 408576698