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

Unified Diff: Source/platform/graphics/BitmapImage.cpp

Issue 1308233002: Remove external BitmapImage lazy decoding tracking (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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
« no previous file with comments | « Source/platform/graphics/BitmapImage.h ('k') | Source/platform/graphics/DeferredImageDecoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/BitmapImage.cpp
diff --git a/Source/platform/graphics/BitmapImage.cpp b/Source/platform/graphics/BitmapImage.cpp
index eec27f48d948cde0ca50efbcc2d49da620037bd1..e324ae2238771132d93295642084fe0955851313 100644
--- a/Source/platform/graphics/BitmapImage.cpp
+++ b/Source/platform/graphics/BitmapImage.cpp
@@ -172,7 +172,6 @@ void BitmapImage::cacheFrame(size_t index)
if (repetitionCount(false) != cAnimationNone)
m_frames[index].m_duration = m_source.frameDurationAtIndex(index);
m_frames[index].m_hasAlpha = m_source.frameHasAlphaAtIndex(index);
- m_frames[index].m_isLazyDecoded = m_source.frameIsLazyDecodedAtIndex(index);
m_frames[index].m_frameBytes = m_source.frameBytesAtIndex(index);
const IntSize frameSize(index ? m_source.frameSizeAtIndex(index) : m_size);
@@ -448,7 +447,8 @@ bool BitmapImage::currentFrameIsComplete()
bool BitmapImage::currentFrameIsLazyDecoded()
{
- return ensureFrameIsCached(currentFrame()) && frameIsLazyDecodedAtIndex(currentFrame());
+ RefPtr<SkImage> image = frameAtIndex(currentFrame());
+ return image && image->isLazyGenerated();
}
ImageOrientation BitmapImage::currentFrameOrientation()
@@ -467,17 +467,6 @@ ImageOrientation BitmapImage::frameOrientationAtIndex(size_t index)
return m_source.orientationAtIndex(index);
}
-bool BitmapImage::frameIsLazyDecodedAtIndex(size_t index) const
-{
- if (m_frames.size() <= index)
- return false;
-
- if (m_frames[index].m_haveMetadata)
- return m_frames[index].m_isLazyDecoded;
-
- return m_source.frameIsLazyDecodedAtIndex(index);
-}
-
int BitmapImage::repetitionCount(bool imageKnownToBeComplete)
{
if ((m_repetitionCountStatus == Unknown) || ((m_repetitionCountStatus == Uncertain) && imageKnownToBeComplete)) {
« no previous file with comments | « Source/platform/graphics/BitmapImage.h ('k') | Source/platform/graphics/DeferredImageDecoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698