Skip to content
This repository was archived by the owner on Apr 3, 2020. It is now read-only.

Commit 30361fa

Browse files
committed
Merge 182798 "Adding blink side flag that allows disabling YUV d..."
> Adding blink side flag that allows disabling YUV decoding > > BUG= > > Review URL: https://codereview.chromium.org/609923003 BUG=413001 [email protected] Review URL: https://codereview.chromium.org/628213002 git-svn-id: svn://svn.chromium.org/blink/branches/chromium/2171@183270 bbb929c8-8fbe-4397-9dbb-9b2b20218538
1 parent 9585844 commit 30361fa

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

Source/platform/RuntimeEnabledFeatures.in

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ CSS3TextDecorations status=experimental
5050
CompositedSelectionUpdate
5151
CustomSchemeHandler depends_on=NavigatorContentUtils, status=experimental
5252
Database status=stable
53+
DecodeToYUV status=experimental
5354
DeviceLight status=experimental
5455
DisplayList2dCanvas
5556
SVGFontsOnNonGDIPlatforms

Source/platform/graphics/DecodingImageGenerator.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "SkData.h"
3030
#include "SkImageInfo.h"
3131
#include "platform/PlatformInstrumentation.h"
32+
#include "platform/RuntimeEnabledFeatures.h"
3233
#include "platform/SharedBuffer.h"
3334
#include "platform/TraceEvent.h"
3435
#include "platform/graphics/ImageFrameGenerator.h"
@@ -85,9 +86,11 @@ bool DecodingImageGenerator::onGetPixels(const SkImageInfo& info, void* pixels,
8586

8687
bool DecodingImageGenerator::onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3], SkYUVColorSpace* colorSpace)
8788
{
88-
if (!planes || !planes[0]) {
89+
if (!RuntimeEnabledFeatures::decodeToYUVEnabled())
90+
return false;
91+
92+
if (!planes || !planes[0])
8993
return m_frameGenerator->getYUVComponentSizes(sizes);
90-
}
9194

9295
TRACE_EVENT0("blink", "DecodingImageGenerator::onGetYUV8Planes");
9396
PlatformInstrumentation::willDecodeLazyPixelRef(m_generationId);

Source/web/WebRuntimeFeatures.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ void WebRuntimeFeatures::enableDatabase(bool enable)
7575
RuntimeEnabledFeatures::setDatabaseEnabled(enable);
7676
}
7777

78+
void WebRuntimeFeatures::enableDecodeToYUV(bool enable)
79+
{
80+
RuntimeEnabledFeatures::setDecodeToYUVEnabled(enable);
81+
}
82+
7883
void WebRuntimeFeatures::enableDisplayList2dCanvas(bool enable)
7984
{
8085
RuntimeEnabledFeatures::setDisplayList2dCanvasEnabled(enable);

public/web/WebRuntimeFeatures.h

+2
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ class WebRuntimeFeatures {
4949
BLINK_EXPORT static void enableCompositedSelectionUpdate(bool);
5050
BLINK_EXPORT static bool isCompositedSelectionUpdateEnabled();
5151

52+
BLINK_EXPORT static void enableDecodeToYUV(bool);
53+
5254
BLINK_EXPORT static void enableDisplayList2dCanvas(bool);
5355

5456
BLINK_EXPORT static void enableEncryptedMedia(bool);

0 commit comments

Comments
 (0)