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

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

Issue 1508683002: DeferredImageDecoder: early-out onGetYUV8Planes when possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch for landing Created 5 years 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
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 0d29bce0f18e6463f7fcbfd94cabe702c6455231..0230e474f4411dec576b02d6f865cad892eb5c7c 100644
--- a/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp
+++ b/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp
@@ -354,7 +354,7 @@ bool ImageFrameGenerator::getYUVComponentSizes(SkISize componentSizes[3])
{
ASSERT(componentSizes);
- TRACE_EVENT2("webkit", "ImageFrameGenerator::getYUVComponentSizes", "width", m_fullSize.width(), "height", m_fullSize.height());
+ TRACE_EVENT2("blink", "ImageFrameGenerator::getYUVComponentSizes", "width", m_fullSize.width(), "height", m_fullSize.height());
SharedBuffer* data = 0;
bool allDataReceived = false;
@@ -368,11 +368,6 @@ bool ImageFrameGenerator::getYUVComponentSizes(SkISize componentSizes[3])
if (!decoder)
return false;
- // JPEG images support YUV decoding: other decoders do not. So don't pump data into decoders
- // that always return false to updateYUVComponentSizes() requests.
- if (decoder->filenameExtension() != "jpg")
- return false;
-
// Setting a dummy ImagePlanes object signals to the decoder that we want to do YUV decoding.
decoder->setData(data, allDataReceived);
OwnPtr<ImagePlanes> dummyImagePlanes = adoptPtr(new ImagePlanes);

Powered by Google App Engine
This is Rietveld 408576698