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

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

Issue 609923003: Adding blink side flag that allows disabling YUV decoding (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Moved from WebSettings to WebRuntimeFeatures 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 | « Source/platform/RuntimeEnabledFeatures.in ('k') | Source/web/WebRuntimeFeatures.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/DecodingImageGenerator.cpp
diff --git a/Source/platform/graphics/DecodingImageGenerator.cpp b/Source/platform/graphics/DecodingImageGenerator.cpp
index 4aa8a6dbffc57813ed87c567d7548c35d2586c47..05ef3ef9532a4c6ce06238135fdfe405bc9540ab 100644
--- a/Source/platform/graphics/DecodingImageGenerator.cpp
+++ b/Source/platform/graphics/DecodingImageGenerator.cpp
@@ -29,6 +29,7 @@
#include "SkData.h"
#include "SkImageInfo.h"
#include "platform/PlatformInstrumentation.h"
+#include "platform/RuntimeEnabledFeatures.h"
#include "platform/SharedBuffer.h"
#include "platform/TraceEvent.h"
#include "platform/graphics/ImageFrameGenerator.h"
@@ -85,9 +86,11 @@ bool DecodingImageGenerator::onGetPixels(const SkImageInfo& info, void* pixels,
bool DecodingImageGenerator::onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3], SkYUVColorSpace* colorSpace)
{
- if (!planes || !planes[0]) {
+ if (!RuntimeEnabledFeatures::decodeToYUVEnabled())
+ return false;
+
+ if (!planes || !planes[0])
return m_frameGenerator->getYUVComponentSizes(sizes);
- }
TRACE_EVENT0("blink", "DecodingImageGenerator::onGetYUV8Planes");
PlatformInstrumentation::willDecodeLazyPixelRef(m_generationId);
« no previous file with comments | « Source/platform/RuntimeEnabledFeatures.in ('k') | Source/web/WebRuntimeFeatures.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698