Commit 7df4f93c authored by Aaron Krajeski's avatar Aaron Krajeski Committed by Commit Bot

Set flag to not wait for activation

Waiting for the compositor "activation" means that we cannot
parallelize the layers. Create an experiment here to remove it.

Tests and perf with this WIP CL:
https://chromium-review.googlesource.com/c/chromium/src/+/2057346

Bug: 1046463
Change-Id: I7631a84eca45e2ce20de51628c8c652108ba6cba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2056933
Commit-Queue: Aaron Krajeski <aaronhk@chromium.org>
Reviewed-by: default avatarAaron Krajeski <aaronhk@chromium.org>
Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#743161}
parent e5e97fd7
...@@ -12,6 +12,11 @@ namespace features { ...@@ -12,6 +12,11 @@ namespace features {
const base::Feature kImpulseScrollAnimations = { const base::Feature kImpulseScrollAnimations = {
"ImpulseScrollAnimations", base::FEATURE_DISABLED_BY_DEFAULT}; "ImpulseScrollAnimations", base::FEATURE_DISABLED_BY_DEFAULT};
// When enabled BeginMainFrame does not wait for activation in the compositor
// thread for texture layers (crbug.com/1046463)
const base::Feature kTextureLayerSkipWaitForActivation{
"TextureLayerSkipWaitForActivation", base::FEATURE_DISABLED_BY_DEFAULT};
#if !defined(OS_ANDROID) #if !defined(OS_ANDROID)
// Enables latency recovery on the impl thread. // Enables latency recovery on the impl thread.
const base::Feature kImplLatencyRecovery = {"ImplLatencyRecovery", const base::Feature kImplLatencyRecovery = {"ImplLatencyRecovery",
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
namespace features { namespace features {
CC_BASE_EXPORT extern const base::Feature kImpulseScrollAnimations; CC_BASE_EXPORT extern const base::Feature kImpulseScrollAnimations;
CC_BASE_EXPORT extern const base::Feature kTextureLayerSkipWaitForActivation;
#if !defined(OS_ANDROID) #if !defined(OS_ANDROID)
CC_BASE_EXPORT extern const base::Feature kImplLatencyRecovery; CC_BASE_EXPORT extern const base::Feature kImplLatencyRecovery;
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "base/sequenced_task_runner.h" #include "base/sequenced_task_runner.h"
#include "base/synchronization/lock.h" #include "base/synchronization/lock.h"
#include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event.h"
#include "cc/base/features.h"
#include "cc/base/simple_enclosed_region.h" #include "cc/base/simple_enclosed_region.h"
#include "cc/layers/texture_layer_client.h" #include "cc/layers/texture_layer_client.h"
#include "cc/layers/texture_layer_impl.h" #include "cc/layers/texture_layer_impl.h"
...@@ -111,7 +112,9 @@ void TextureLayer::SetTransferableResourceInternal( ...@@ -111,7 +112,9 @@ void TextureLayer::SetTransferableResourceInternal(
UpdateDrawsContent(HasDrawableContent()); UpdateDrawsContent(HasDrawableContent());
// The active frame needs to be replaced and the mailbox returned before the // The active frame needs to be replaced and the mailbox returned before the
// commit is called complete. // commit is called complete.
SetNextCommitWaitsForActivation(); if (!base::FeatureList::IsEnabled(
features::kTextureLayerSkipWaitForActivation))
SetNextCommitWaitsForActivation();
} }
void TextureLayer::SetTransferableResource( void TextureLayer::SetTransferableResource(
...@@ -139,10 +142,12 @@ void TextureLayer::SetLayerTreeHost(LayerTreeHost* host) { ...@@ -139,10 +142,12 @@ void TextureLayer::SetLayerTreeHost(LayerTreeHost* host) {
needs_set_resource_ = true; needs_set_resource_ = true;
// The active frame needs to be replaced and the mailbox returned before the // The active frame needs to be replaced and the mailbox returned before the
// commit is called complete. // commit is called complete.
SetNextCommitWaitsForActivation(); if (!base::FeatureList::IsEnabled(
features::kTextureLayerSkipWaitForActivation))
SetNextCommitWaitsForActivation();
} }
if (host) { if (host) {
// When attached to a new LayerTreHost, all previously registered // When attached to a new LayerTreeHost, all previously registered
// SharedBitmapIds will need to be re-sent to the new TextureLayerImpl // SharedBitmapIds will need to be re-sent to the new TextureLayerImpl
// representing this layer on the compositor thread. // representing this layer on the compositor thread.
to_register_bitmaps_.insert( to_register_bitmaps_.insert(
......
...@@ -4730,6 +4730,10 @@ const FeatureEntry kFeatureEntries[] = { ...@@ -4730,6 +4730,10 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kImpulseScrollAnimationsName, flag_descriptions::kImpulseScrollAnimationsName,
flag_descriptions::kImpulseScrollAnimationsDescription, kOsAll, flag_descriptions::kImpulseScrollAnimationsDescription, kOsAll,
FEATURE_VALUE_TYPE(features::kImpulseScrollAnimations)}, FEATURE_VALUE_TYPE(features::kImpulseScrollAnimations)},
{"texture-layer-skip-wait-for-activation",
flag_descriptions::kTextureLayerSkipWaitForActivationName,
flag_descriptions::kTextureLayerSkipWaitForActivationDescription, kOsAll,
FEATURE_VALUE_TYPE(features::kTextureLayerSkipWaitForActivation)},
{"percent-based-scrolling", flag_descriptions::kPercentBasedScrollingName, {"percent-based-scrolling", flag_descriptions::kPercentBasedScrollingName,
flag_descriptions::kPercentBasedScrollingDescription, kOsAll, flag_descriptions::kPercentBasedScrollingDescription, kOsAll,
FEATURE_VALUE_TYPE(features::kPercentBasedScrolling)}, FEATURE_VALUE_TYPE(features::kPercentBasedScrolling)},
......
...@@ -3525,6 +3525,11 @@ ...@@ -3525,6 +3525,11 @@
"owners": [ "joelhockey", "benwells", "//chrome/browser/chromeos/guest_os/OWNERS" ], "owners": [ "joelhockey", "benwells", "//chrome/browser/chromeos/guest_os/OWNERS" ],
"expiry_milestone": 85 "expiry_milestone": 85
}, },
{
"name": "texture-layer-skip-wait-for-activation",
"owners": [ "fserb@chromium.org", "aaronhk@chromium.org" ],
"expiry_milestone": 90
},
{ {
"name": "tint-gl-composited-content", "name": "tint-gl-composited-content",
"owners": [ "chromeos-gfx@google.com" ], "owners": [ "chromeos-gfx@google.com" ],
......
...@@ -1189,6 +1189,10 @@ const char kNewTabstripAnimationName[] = "New tabstrip animations"; ...@@ -1189,6 +1189,10 @@ const char kNewTabstripAnimationName[] = "New tabstrip animations";
const char kNewTabstripAnimationDescription[] = const char kNewTabstripAnimationDescription[] =
"New implementation of tabstrip animations."; "New implementation of tabstrip animations.";
const char kTextureLayerSkipWaitForActivationName[] = "Parallelize layers";
const char kTextureLayerSkipWaitForActivationDescription[] =
"Don't wait for layer activation before beginning new frame.";
const char kNotificationIndicatorName[] = "Notification Indicators"; const char kNotificationIndicatorName[] = "Notification Indicators";
const char kNotificationIndicatorDescription[] = const char kNotificationIndicatorDescription[] =
"Enable notification indicators, which appear on app icons when a " "Enable notification indicators, which appear on app icons when a "
......
...@@ -711,6 +711,9 @@ extern const char kNewUsbBackendDescription[]; ...@@ -711,6 +711,9 @@ extern const char kNewUsbBackendDescription[];
extern const char kNewTabstripAnimationName[]; extern const char kNewTabstripAnimationName[];
extern const char kNewTabstripAnimationDescription[]; extern const char kNewTabstripAnimationDescription[];
extern const char kTextureLayerSkipWaitForActivationName[];
extern const char kTextureLayerSkipWaitForActivationDescription[];
extern const char kNotificationIndicatorName[]; extern const char kNotificationIndicatorName[];
extern const char kNotificationIndicatorDescription[]; extern const char kNotificationIndicatorDescription[];
......
...@@ -38928,6 +38928,7 @@ from previous Chrome versions. ...@@ -38928,6 +38928,7 @@ from previous Chrome versions.
<int value="301869874" label="NTPPhysicalWebPageSuggestions:disabled"/> <int value="301869874" label="NTPPhysicalWebPageSuggestions:disabled"/>
<int value="303058039" label="AccountConsistency:disabled"/> <int value="303058039" label="AccountConsistency:disabled"/>
<int value="303252119" label="AutofillExpandedPopupViews:disabled"/> <int value="303252119" label="AutofillExpandedPopupViews:disabled"/>
<int value="304588364" label="TextureLayerSkipWaitForActivation:enabled"/>
<int value="304901781" label="NewUsbBackend:enabled"/> <int value="304901781" label="NewUsbBackend:enabled"/>
<int value="306641800" label="AndroidSiteSettingsUIRefresh:disabled"/> <int value="306641800" label="AndroidSiteSettingsUIRefresh:disabled"/>
<int value="306834044" label="webui-tab-strip"/> <int value="306834044" label="webui-tab-strip"/>
...@@ -39045,6 +39046,7 @@ from previous Chrome versions. ...@@ -39045,6 +39046,7 @@ from previous Chrome versions.
<int value="423855924" label="enable-tab-switcher-theme-colors"/> <int value="423855924" label="enable-tab-switcher-theme-colors"/>
<int value="425072496" label="GridLayoutForNtpShortcuts:enabled"/> <int value="425072496" label="GridLayoutForNtpShortcuts:enabled"/>
<int value="425520856" label="InterestFeedNotifications:enabled"/> <int value="425520856" label="InterestFeedNotifications:enabled"/>
<int value="430776375" label="TextureLayerSkipWaitForActivation:disabled"/>
<int value="430959979" label="SyncStandaloneTransport:disabled"/> <int value="430959979" label="SyncStandaloneTransport:disabled"/>
<int value="431691805" label="MediaDocumentDownloadButton:enabled"/> <int value="431691805" label="MediaDocumentDownloadButton:enabled"/>
<int value="434033638" label="PwaPersistentNotification:disabled"/> <int value="434033638" label="PwaPersistentNotification:disabled"/>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment