Index: third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h |
diff --git a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h |
index 34ffa5ac0a5142b65f95acd82492a48a7be13593..b2a8aea67fdf6a47341216ff4fea11297ee2bc45 100644 |
--- a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h |
+++ b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h |
@@ -47,7 +47,8 @@ class PLATFORM_EXPORT DeferredImageDecoder final { |
WTF_MAKE_NONCOPYABLE(DeferredImageDecoder); |
USING_FAST_MALLOC(DeferredImageDecoder); |
public: |
- static std::unique_ptr<DeferredImageDecoder> create(ImageDecoder::SniffResult, ImageDecoder::AlphaOption, ImageDecoder::GammaAndColorProfileOption); |
+ static std::unique_ptr<DeferredImageDecoder> create(PassRefPtr<SharedBuffer> data, bool dataComplete, |
+ ImageDecoder::AlphaOption, ImageDecoder::GammaAndColorProfileOption); |
static std::unique_ptr<DeferredImageDecoder> createForTesting(std::unique_ptr<ImageDecoder>); |
@@ -58,7 +59,7 @@ public: |
PassRefPtr<SkImage> createFrameAtIndex(size_t); |
PassRefPtr<SharedBuffer> data(); |
- void setData(SharedBuffer& data, bool allDataReceived); |
+ void setData(PassRefPtr<SharedBuffer> data, bool allDataReceived); |
bool isSizeAvailable(); |
bool hasColorProfile() const; |
@@ -85,6 +86,8 @@ private: |
PassRefPtr<SkImage> createFrameImageAtIndex(size_t index, bool knownToBeOpaque); |
+ void setDataInternal(PassRefPtr<SharedBuffer> data, bool allDataReceived, bool pushDataToDecoder); |
+ |
// Copy of the data that is passed in, used by deferred decoding. |
// Allows creating readonly snapshots that may be read in another thread. |
std::unique_ptr<SkRWBuffer> m_rwBuffer; |