Index: third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp |
diff --git a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp |
index df4b86994d13c1d7ef177299c069132d5ffbdb52..99c59dc89c15204fc7fcc79767af0332b85422c5 100644 |
--- a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp |
@@ -98,26 +98,16 @@ PassRefPtr<SkImage> DeferredImageDecoder::createFrameAtIndex(size_t index) |
prepareLazyDecodedFrames(); |
- if (index < m_frameData.size()) { |
- DeferredFrameData* frameData = &m_frameData[index]; |
- if (m_actualDecoder) |
- frameData->m_frameBytes = m_actualDecoder->frameBytesAtIndex(index); |
- else |
- frameData->m_frameBytes = m_size.area() * sizeof(ImageFrame::PixelData); |
- // ImageFrameGenerator has the latest known alpha state. There will be a |
- // performance boost if this frame is opaque. |
- DCHECK(m_frameGenerator); |
- return createFrameImageAtIndex(index, !m_frameGenerator->hasAlpha(index)); |
- } |
- |
- if (!m_actualDecoder || m_actualDecoder->failed()) |
- return nullptr; |
- |
- ImageFrame* frame = m_actualDecoder->frameBufferAtIndex(index); |
- if (!frame || frame->getStatus() == ImageFrame::FrameEmpty) |
- return nullptr; |
- |
- return fromSkSp(SkImage::MakeFromBitmap(frame->bitmap())); |
+ DCHECK(index < m_frameData.size()); |
+ DeferredFrameData* frameData = &m_frameData[index]; |
+ if (m_actualDecoder) |
+ frameData->m_frameBytes = m_actualDecoder->frameBytesAtIndex(index); |
+ else |
+ frameData->m_frameBytes = m_size.area() * sizeof(ImageFrame::PixelData); |
+ // ImageFrameGenerator has the latest known alpha state. There will be a |
+ // performance boost if this frame is opaque. |
+ DCHECK(m_frameGenerator); |
+ return createFrameImageAtIndex(index, !m_frameGenerator->hasAlpha(index)); |
} |
PassRefPtr<SharedBuffer> DeferredImageDecoder::data() |