Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / platform / graphics / ImageSource.cpp
index 03ae1da..68ce34e 100644 (file)
@@ -55,14 +55,14 @@ bool ImageSource::initialized() const
     return m_decoder;
 }
 
-void ImageSource::setData(SharedBuffer* data, bool allDataReceived)
+void ImageSource::setData(SharedBuffer& data, bool allDataReceived)
 {
     // Make the decoder by sniffing the bytes.
     // This method will examine the data and instantiate an instance of the appropriate decoder plugin.
     // If insufficient bytes are available to determine the image type, no decoder plugin will be
     // made.
     if (!m_decoder)
-        m_decoder = DeferredImageDecoder::create(*data, m_alphaOption, m_gammaAndColorProfileOption);
+        m_decoder = DeferredImageDecoder::create(data, m_alphaOption, m_gammaAndColorProfileOption);
 
     if (m_decoder)
         m_decoder->setData(data, allDataReceived);
@@ -78,6 +78,11 @@ bool ImageSource::isSizeAvailable()
     return m_decoder && m_decoder->isSizeAvailable();
 }
 
+bool ImageSource::hasColorProfile() const
+{
+    return m_decoder && m_decoder->hasColorProfile();
+}
+
 IntSize ImageSource::size(RespectImageOrientationEnum shouldRespectOrientation) const
 {
     return frameSizeAtIndex(0, shouldRespectOrientation);