viz: Disable SkiaRenderer on cros legacy video decoder boards
This CL unilaterally disables SkiaRenderer on Chrome OS boards that still use the legacy video decoder (e.g. rk3399 and Broadwell) in preparation for the Chrome OS SkiaRenderer finch. Instead of using the `exclude_hardware_classes` finch configuration field, we opt to define the exclude in code. This is because these platforms are slated to migrate to the new video decoder pipeline by EoY, and when they do, we can avoid having to make a separate finch config change. This CL also moves the kPlatformDisallowsChromeOSDirectVideoDecoder flag out of media/ and into viz/ for visibility. For more context, see the referenced bug. Bug: 1145180 Change-Id: I043175fcdad4a2a0534b9a0db5277bec0c45e3d1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2518460 Commit-Queue: Brian Ho <hob@chromium.org> Reviewed-by: Dan Sanders <sandersd@chromium.org> Reviewed-by: Jonathan Backer <backer@chromium.org> Cr-Commit-Position: refs/heads/master@{#824445}
This commit is contained in:
components/viz/common
content
media/base
@ -285,6 +285,7 @@ viz_component("common") {
|
||||
deps = [
|
||||
"//base",
|
||||
"//build:chromecast_buildflags",
|
||||
"//build:chromeos_buildflags",
|
||||
|
||||
# TODO(staraz): cc/base was added because SharedQuadState includes
|
||||
# cc::MathUtil. Remove it once cc/base/math_util* are moved to viz.
|
||||
|
@ -113,6 +113,15 @@ bool IsUsingSkiaRenderer() {
|
||||
if (IsUsingVizForWebView())
|
||||
return true;
|
||||
|
||||
#if BUILDFLAG(IS_ASH)
|
||||
// TODO(https://crbug.com/1145180): SkiaRenderer isn't supported on Chrome
|
||||
// OS boards that still use the legacy video decoder.
|
||||
auto* command_line = base::CommandLine::ForCurrentProcess();
|
||||
if (command_line->HasSwitch(
|
||||
switches::kPlatformDisallowsChromeOSDirectVideoDecoder))
|
||||
return false;
|
||||
#endif
|
||||
|
||||
return base::FeatureList::IsEnabled(kUseSkiaRenderer) ||
|
||||
base::FeatureList::IsEnabled(kVulkan);
|
||||
}
|
||||
|
@ -42,6 +42,14 @@ const char kEnableVizDevTools[] = "enable-viz-devtools";
|
||||
// Enables hit-test debug logging.
|
||||
const char kEnableVizHitTestDebug[] = "enable-viz-hit-test-debug";
|
||||
|
||||
#if BUILDFLAG(IS_ASH)
|
||||
// ChromeOS uses one of two VideoDecoder implementations based on SoC/board
|
||||
// specific configurations that are signalled via this command line flag.
|
||||
// TODO(b/159825227): remove when the "old" video decoder is fully launched.
|
||||
const char kPlatformDisallowsChromeOSDirectVideoDecoder[] =
|
||||
"platform-disallows-chromeos-direct-video-decoder";
|
||||
#endif
|
||||
|
||||
// Effectively disables pipelining of compositor frame production stages by
|
||||
// waiting for each stage to finish before completing a frame.
|
||||
const char kRunAllCompositorStagesBeforeDraw[] =
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "base/optional.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "components/viz/common/viz_common_export.h"
|
||||
|
||||
namespace switches {
|
||||
@ -22,6 +23,12 @@ VIZ_COMMON_EXPORT extern const char kEnableDeJelly[];
|
||||
VIZ_COMMON_EXPORT extern const char kEnableHardwareOverlays[];
|
||||
VIZ_COMMON_EXPORT extern const char kEnableVizDevTools[];
|
||||
VIZ_COMMON_EXPORT extern const char kEnableVizHitTestDebug[];
|
||||
|
||||
#if BUILDFLAG(IS_ASH)
|
||||
VIZ_COMMON_EXPORT extern const char
|
||||
kPlatformDisallowsChromeOSDirectVideoDecoder[];
|
||||
#endif
|
||||
|
||||
VIZ_COMMON_EXPORT extern const char kRunAllCompositorStagesBeforeDraw[];
|
||||
VIZ_COMMON_EXPORT extern const char kShowAggregatedDamage[];
|
||||
VIZ_COMMON_EXPORT extern const char kShowDCLayerDebugBorders[];
|
||||
|
@ -294,6 +294,9 @@ static const char* const kSwitchNames[] = {
|
||||
switches::kEnableReachedCodeProfiler,
|
||||
switches::kReachedCodeSamplingIntervalUs,
|
||||
#endif
|
||||
#if BUILDFLAG(IS_ASH)
|
||||
switches::kPlatformDisallowsChromeOSDirectVideoDecoder,
|
||||
#endif
|
||||
};
|
||||
|
||||
// These values are persisted to logs. Entries should not be renumbered and
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "build/build_config.h"
|
||||
#include "cc/base/switches.h"
|
||||
#include "components/viz/common/features.h"
|
||||
#include "components/viz/common/switches.h"
|
||||
#include "components/viz/common/viz_utils.h"
|
||||
#include "content/browser/browser_main_loop.h"
|
||||
#include "content/browser/gpu/gpu_process_host.h"
|
||||
|
@ -192,14 +192,6 @@ const char kOverrideHardwareSecureCodecsForTesting[] =
|
||||
const char kEnableLiveCaptionPrefForTesting[] =
|
||||
"enable-live-caption-pref-for-testing";
|
||||
|
||||
#if BUILDFLAG(IS_ASH)
|
||||
// ChromeOS uses one of two VideoDecoder implementations based on SoC/board
|
||||
// specific configurations that are signalled via this command line flag.
|
||||
// TODO(b/159825227): remove when the "old" video decoder is fully launched.
|
||||
const char kPlatformDisallowsChromeOSDirectVideoDecoder[] =
|
||||
"platform-disallows-chromeos-direct-video-decoder";
|
||||
#endif
|
||||
|
||||
namespace autoplay {
|
||||
|
||||
// Autoplay policy that requires a document user activation.
|
||||
|
@ -56,10 +56,6 @@ MEDIA_EXPORT extern const char kDisableAudioInput[];
|
||||
MEDIA_EXPORT extern const char kUseOverlaysForVideo[];
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_ASH)
|
||||
MEDIA_EXPORT extern const char kPlatformDisallowsChromeOSDirectVideoDecoder[];
|
||||
#endif
|
||||
|
||||
#if defined(USE_CRAS)
|
||||
MEDIA_EXPORT extern const char kUseCras[];
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user