chromium/cc/base/features.cc

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "cc/base/features.h"

#include <string>

#include "base/feature_list.h"
#include "build/build_config.h"
#include "ui/base/ui_base_features.h"

namespace features {

// Uses the Resume method instead of the Catch-up method for animated images.
// - Catch-up behavior tries to keep animated images in pace with wall-clock
//   time. This might require decoding several animation frames if the
//   animation has fallen behind.
// - Resume behavior presents what would have been the next presented frame.
//   This means it might only decode one frame, resuming where it left off.
//   However, if the animation updates faster than the display's refresh rate,
//   it is possible to decode more than a single frame.
BASE_FEATURE();

bool IsImpulseScrollAnimationEnabled() {}

// Whether the compositor should attempt to sync with the scroll handlers before
// submitting a frame.
BASE_FEATURE();
#endif

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

const base::FeatureParam<int> kDeferImplInvalidationFrames{};

// Note that kUseDMSAAForTiles only controls vulkan launch on android. We will
// be using a separate flag to control the launch on GL.
BASE_FEATURE();

#if BUILDFLAG(IS_ANDROID)
// This flag controls the DMSAA for tile raster on Android GL backend whereas
// above flag UseDMSAAForTiles controls the launch on Vulkan backend.
BASE_FEATURE(kUseDMSAAForTilesAndroidGL,
             "UseDMSAAForTilesAndroidGL",
             base::FEATURE_ENABLED_BY_DEFAULT);

BASE_FEATURE(kAndroidNoSurfaceSyncForBrowserControls,
             "AndroidNoSurfaceSyncForBrowserControls",
             base::FEATURE_DISABLED_BY_DEFAULT);
#endif

BASE_FEATURE();

BASE_FEATURE();
#endif

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

// This saves memory on all platforms, but while on Android savings are
// significant (~10MiB or more of foreground memory), on desktop they were
// small, so only enable on Android.
//
// Disabled 04/2024 as it regresses checkerboarding metrics. Feature kept around
// to find a better balance between checkerboarding and memory.
BASE_FEATURE();

const base::FeatureParam<int> kInterestAreaSizeInPixels{};

BASE_FEATURE();

const base::FeatureParam<int> kReclaimDelayInSeconds{};

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

const base::FeatureParam<double> kWaitForLateScrollEventsDeadlineRatio{};

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

bool IsCCSlimmingEnabled() {}

const base::FeatureParam<std::string> kScrollEventDispatchMode(
    &kWaitForLateScrollEvents,
    "mode",
    "EnqueueScrollEvents");
constexpr const char kScrollEventDispatchModeDispatchScrollEventsImmediately[] =;
constexpr const char kScrollEventDispatchModeUseScrollPredictorForEmptyQueue[] =;
constexpr const char kScrollEventDispatchModeUseScrollPredictorForDeadline[] =;

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

// By default, frame rate starts being throttled when 4 consecutive "did not
// produce frame" are observed. It stops being throttled when there's a drawn
// frame.
const base::FeatureParam<int> kNumDidNotProduceFrameBeforeThrottle{};

}  // namespace features