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

Unified Diff: third_party/WebKit/WebCore/platform/graphics/skia/ImageSourceSkia.cpp

Issue 18034: Recreate the skia image decoder from the undecoded data bits passed down, whe... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/WebCore/platform/graphics/skia/ImageSourceSkia.cpp
===================================================================
--- third_party/WebKit/WebCore/platform/graphics/skia/ImageSourceSkia.cpp (revision 7936)
+++ third_party/WebKit/WebCore/platform/graphics/skia/ImageSourceSkia.cpp (working copy)
@@ -100,16 +100,16 @@
void ImageSource::clear(bool destroyAll, size_t clearBeforeFrame, SharedBuffer* data, bool allDataReceived)
{
- // TODO(darin): Figure out what to do with the |data| and |allDataReceived| params.
-
- if (destroyAll) {
- delete m_decoder;
- m_decoder = 0;
+ if (!destroyAll) {
+ if (m_decoder)
+ m_decoder->clearFrameBufferCache(clearBeforeFrame);
return;
}
- if (m_decoder)
- m_decoder->clearFrameBufferCache(clearBeforeFrame);
+ delete m_decoder;
+ m_decoder = 0;
+ if (data)
+ setData(data, allDataReceived);
}
bool ImageSource::initialized() const
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698