Index: Source/platform/graphics/DeferredImageDecoder.cpp |
diff --git a/Source/platform/graphics/DeferredImageDecoder.cpp b/Source/platform/graphics/DeferredImageDecoder.cpp |
index 4f3822ee4e45856193d1fd68afefb19e605bda06..fd35350ef113eeffaf0133705625126ad7da6d77 100644 |
--- a/Source/platform/graphics/DeferredImageDecoder.cpp |
+++ b/Source/platform/graphics/DeferredImageDecoder.cpp |
@@ -126,8 +126,8 @@ void DeferredImageDecoder::setData(SharedBuffer& data, bool allDataReceived) |
bool DeferredImageDecoder::isSizeAvailable() |
{ |
- // m_actualDecoder is 0 only if image decoding is deferred and that |
- // means image header decoded successfully and size is available. |
+ // m_actualDecoder is 0 only if image decoding is deferred and that means the |
+ // image header decoded successfully and the size is available. |
return m_actualDecoder ? m_actualDecoder->isSizeAvailable() : true; |
} |
@@ -136,6 +136,11 @@ bool DeferredImageDecoder::hasColorProfile() const |
return m_actualDecoder ? m_actualDecoder->hasColorProfile() : m_hasColorProfile; |
} |
+PassRefPtr<ColorSpaceProfile> DeferredImageDecoder::colorProfile() const |
+{ |
+ return m_actualDecoder ? m_actualDecoder->colorProfile() : m_colorProfile; |
+} |
+ |
IntSize DeferredImageDecoder::size() const |
{ |
return m_actualDecoder ? m_actualDecoder->size() : m_size; |
@@ -212,6 +217,7 @@ void DeferredImageDecoder::activateLazyDecoding() |
m_orientation = m_actualDecoder->orientation(); |
m_filenameExtension = m_actualDecoder->filenameExtension(); |
m_hasColorProfile = m_actualDecoder->hasColorProfile(); |
+ m_colorProfile = m_hasColorProfile ? m_actualDecoder->colorProfile() : nullptr; |
const bool isSingleFrame = m_actualDecoder->repetitionCount() == cAnimationNone || (m_allDataReceived && m_actualDecoder->frameCount() == 1u); |
m_frameGenerator = ImageFrameGenerator::create(SkISize::Make(m_actualDecoder->decodedSize().width(), m_actualDecoder->decodedSize().height()), m_data, m_allDataReceived, !isSingleFrame); |
} |