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

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

Issue 985583002: Don't cache any SkBitmaps in DeferredImageDecoder (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: done now Created 5 years, 9 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/BitmapImageTest.cpp » ('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 e7d12346128df415b7b2c3c559ba0f91b8398056..6bbae0ebc0c863009937184ebce0b4b693fd9da7 100644
--- a/Source/platform/graphics/BitmapImage.cpp
+++ b/Source/platform/graphics/BitmapImage.cpp
@@ -146,8 +146,9 @@ void BitmapImage::destroyDecodedDataIfNecessary()
for (size_t i = 0; i < m_frames.size(); ++i)
allFrameBytes += m_frames[i].m_frameBytes;
- if (allFrameBytes > cLargeAnimationCutoff)
+ if (allFrameBytes > cLargeAnimationCutoff) {
destroyDecodedData(false);
+ }
}
void BitmapImage::destroyMetadataAndNotify(size_t frameBytesCleared)
@@ -311,13 +312,6 @@ void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& dstRect, const Fl
startAnimation();
}
-void BitmapImage::resetDecoder()
-{
- ASSERT(isMainThread());
-
- m_source.resetDecoder();
-}
-
size_t BitmapImage::frameCount()
{
if (!m_haveFrameCount) {
@@ -603,7 +597,7 @@ bool BitmapImage::internalAdvanceAnimation(bool skippingFrames)
// repetition count before, we should have decoded the whole image by
// now, so it should now be available.
// Note that we don't need to special-case cAnimationLoopOnce here
- // because it is 0 (see comments on its declaration in ImageSource.h).
+ // because it is 0 (see comments on its declaration in ImageAnimation.h).
if ((repetitionCount(true) != cAnimationLoopInfinite && m_repetitionsComplete > m_repetitionCount)
|| (m_animationPolicy == ImageAnimationPolicyAnimateOnce && m_repetitionsComplete > 0)) {
m_animationFinished = true;
« no previous file with comments | « Source/platform/graphics/BitmapImage.h ('k') | Source/platform/graphics/BitmapImageTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698