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

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

Issue 1829923004: Do not set m_decodeFailed in ImageFrameGenerator::decodeToYUV (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: back to PS1, add a new m_yuvDecodingFailed Created 4 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 | « third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp b/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp
index 4800a3141ac19725d605923cccbbcb94373fba80..312dba24c3dd11a02830bf9cf60c3f94ab0f24c4 100644
--- a/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp
+++ b/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp
@@ -106,6 +106,7 @@ ImageFrameGenerator::ImageFrameGenerator(const SkISize& fullSize, PassRefPtr<Sha
, m_data(adoptRef(new ThreadSafeDataTransport()))
, m_isMultiFrame(isMultiFrame)
, m_decodeFailed(false)
+ , m_yuvDecodingFailed(false)
, m_frameCount(0)
, m_encodedData(nullptr)
{
@@ -248,7 +249,7 @@ bool ImageFrameGenerator::decodeToYUV(size_t index, const SkISize componentSizes
}
ASSERT(decoder->failed());
- m_decodeFailed = true;
+ m_yuvDecodingFailed = true;
return false;
}
@@ -395,6 +396,9 @@ bool ImageFrameGenerator::getYUVComponentSizes(SkYUVSizeInfo* sizeInfo)
{
TRACE_EVENT2("blink", "ImageFrameGenerator::getYUVComponentSizes", "width", m_fullSize.width(), "height", m_fullSize.height());
+ if (m_yuvDecodingFailed)
+ return false;
+
SharedBuffer* data = 0;
bool allDataReceived = false;
m_data->data(&data, &allDataReceived);
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698