0

Cleanup MainThreadCompositingPriority

R=etiennep@chromium.org

Fixed: 259954298, 362247428
Change-Id: Ia849e5a12779b2eea3baf558f12f2487ec80ee5c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6115536
Reviewed-by: Charlie Reis <creis@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Commit-Queue: Charlie Reis <creis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1401849}
This commit is contained in:
Gabriel Charette
2025-01-03 09:05:50 -08:00
committed by Chromium LUCI CQ
parent e36d2d7c14
commit 58df9f6bcd
7 changed files with 5 additions and 41 deletions
android_webview/java/src/org/chromium/android_webview/common
chrome/browser
content

@ -524,9 +524,6 @@ public final class ProductionSupportedFlagList {
+ "log upload."),
Flag.baseFeature(
MetricsFeatures.METRICS_LOG_TRIMMING, "Controls trimming for metrics logs."),
Flag.baseFeature(
ContentFeatures.MAIN_THREAD_COMPOSITING_PRIORITY,
"When enabled runs the main thread at compositing priority."),
Flag.baseFeature(
ContentFeatures.REDUCE_SUBRESOURCE_RESPONSE_STARTED_IPC,
"When enabled, reduces SubresourceResponseStarted IPC by sending"

@ -6755,11 +6755,6 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(
features::kPrivateNetworkAccessForNavigationsWarningOnly)},
{"main-thread-compositing-priority",
flag_descriptions::kMainThreadCompositingPriorityName,
flag_descriptions::kMainThreadCompositingPriorityDescription, kOsAll,
FEATURE_VALUE_TYPE(features::kMainThreadCompositingPriority)},
{"mbi-mode", flag_descriptions::kMBIModeName,
flag_descriptions::kMBIModeDescription, kOsAll,
FEATURE_WITH_PARAMS_VALUE_TYPE(features::kMBIMode,

@ -990,12 +990,6 @@ const char kDoubleBufferCompositingDescription[] =
"Latency should be reduced in some cases. On the other hand, more skipped "
"frames are expected.";
const char kMainThreadCompositingPriorityName[] =
"Main thread runs as compositing";
const char kMainThreadCompositingPriorityDescription[] =
"Runs the main thread at compositing priority since it responds to input "
"and is on the critical path.";
const char kMediaSessionEnterPictureInPictureName[] =
"Media Session enterpictureinpicture action";
const char kMediaSessionEnterPictureInPictureDescription[] =

@ -262,9 +262,6 @@ extern const char kCrabbyAvifDescription[];
extern const char kTangibleSyncName[];
extern const char kTangibleSyncDescription[];
extern const char kMainThreadCompositingPriorityName[];
extern const char kMainThreadCompositingPriorityDescription[];
extern const char kMediaSessionEnterPictureInPictureName[];
extern const char kMediaSessionEnterPictureInPictureDescription[];

@ -610,11 +610,6 @@ BASE_FEATURE(kLogJsConsoleMessages,
#endif
);
// Uses ThreadType::kDisplayCritical for the main thread
BASE_FEATURE(kMainThreadCompositingPriority,
"MainThreadCompositingPriority",
base::FEATURE_ENABLED_BY_DEFAULT);
// The MBI mode controls whether or not communication over the
// AgentSchedulingGroup is ordered with respect to the render-process-global
// legacy IPC channel, as well as the granularity of AgentSchedulingGroup

@ -147,7 +147,6 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kLazyInitializeMediaControls);
CONTENT_EXPORT BASE_DECLARE_FEATURE(kLegacyTechReportEnableCookieIssueReports);
CONTENT_EXPORT BASE_DECLARE_FEATURE(kLogJsConsoleMessages);
CONTENT_EXPORT BASE_DECLARE_FEATURE(kLowerPAMemoryLimitForNonMainRenderers);
CONTENT_EXPORT BASE_DECLARE_FEATURE(kMainThreadCompositingPriority);
CONTENT_EXPORT BASE_DECLARE_FEATURE(kMBIMode);
CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebRtcHWDecoding);
CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebRtcHWEncoding);

@ -33,7 +33,6 @@
#include "content/common/content_switches_internal.h"
#include "content/common/features.h"
#include "content/common/skia_utils.h"
#include "content/public/common/content_features.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/main_function_params.h"
#include "content/public/renderer/content_renderer_client.h"
@ -256,24 +255,12 @@ int RendererMain(MainFunctionParams parameters) {
// It also needs to be registered before the process has multiple threads,
// which may race with application of the sandbox.
SandboxedProcessThreadTypeHandler::Create();
// Change the main thread type. On Linux and ChromeOS this needs to be
// done only if kHandleRendererThreadTypeChangesInBrowser is enabled to
// avoid child threads inheriting the main thread settings.
if (base::FeatureList::IsEnabled(
features::kMainThreadCompositingPriority)) {
base::PlatformThread::SetCurrentThreadType(
base::ThreadType::kDisplayCritical);
}
#else
if (base::FeatureList::IsEnabled(
features::kMainThreadCompositingPriority)) {
base::PlatformThread::SetCurrentThreadType(
base::ThreadType::kDisplayCritical);
} else {
base::PlatformThread::SetCurrentThreadType(base::ThreadType::kDefault);
}
#endif
// Consider CrRendererMain a display critical thread. While some Javascript
// running on the main thread might not be, experiments demonstrated that
// overall this improves user-perceived performance.
base::PlatformThread::SetCurrentThreadType(
base::ThreadType::kDisplayCritical);
std::unique_ptr<RenderProcess> render_process = RenderProcessImpl::Create();
// It's not a memory leak since RenderThread has the same lifetime