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

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

Issue 528293003: Moved misplaced allDataReceived() assert (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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 | Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/ImageFrameGenerator.cpp
diff --git a/Source/platform/graphics/ImageFrameGenerator.cpp b/Source/platform/graphics/ImageFrameGenerator.cpp
index 5325c541f42414331eeeb9ca46e4935c574783fa..b046744b31c76ce29b836f7269f4531d654130a3 100644
--- a/Source/platform/graphics/ImageFrameGenerator.cpp
+++ b/Source/platform/graphics/ImageFrameGenerator.cpp
@@ -155,8 +155,7 @@ bool ImageFrameGenerator::decodeToYUV(void* planes[3], size_t rowBytes[3])
m_data.data(&data, &allDataReceived);
// FIXME: YUV decoding does not currently support progressive decoding.
- if (!allDataReceived)
- return false;
+ ASSERT(allDataReceived);
OwnPtr<ImageDecoder> decoder = ImageDecoder::create(*data, ImageSource::AlphaPremultiplied, ImageSource::GammaAndColorProfileApplied);
if (!decoder)
@@ -303,7 +302,8 @@ bool ImageFrameGenerator::getYUVComponentSizes(SkISize componentSizes[3])
m_data.data(&data, &allDataReceived);
// FIXME: YUV decoding does not currently support progressive decoding.
- ASSERT(allDataReceived);
+ if (!allDataReceived)
+ return false;
OwnPtr<ImageDecoder> decoder = ImageDecoder::create(*data, ImageSource::AlphaPremultiplied, ImageSource::GammaAndColorProfileApplied);
if (!decoder)
« no previous file with comments | « no previous file | Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698