Commit aeee6cac authored by Chris Harrelson's avatar Chris Harrelson Committed by Commit Bot

Plumb the feature flag for CompositingOptimizations to Blink.

Bug: 1115577

Change-Id: I17411a1e73aeccf9a242ee104ba2a7b963d08472
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2357093
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: default avatarStefan Zager <szager@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799525}
parent 0ab3a0b1
......@@ -341,7 +341,8 @@ void SetRuntimeFeaturesFromChromiumFeatures() {
{wf::EnableMediaFeeds, media::kMediaFeeds, kUseFeatureState},
{wf::EnableRestrictGamepadAccess, features::kRestrictGamepadAccess,
kEnableOnly},
{wf::EnableCompositingOptimizations,
blink::features::kCompositingOptimizations, kUseFeatureState},
};
for (const auto& mapping : blinkFeatureToBaseFeatureMapping) {
SetRuntimeFeatureFromChromiumFeature(
......
......@@ -251,6 +251,8 @@ class WebRuntimeFeatures {
BLINK_PLATFORM_EXPORT static void EnableContentIndex(bool);
BLINK_PLATFORM_EXPORT static void EnableRestrictGamepadAccess(bool);
BLINK_PLATFORM_EXPORT static void EnableCompositingOptimizations(bool);
private:
WebRuntimeFeatures();
};
......
......@@ -1450,9 +1450,16 @@ AXObject* AXLayoutObject::AccessibilityHitTest(const IntPoint& point) const {
!layout_object_->IsBox())
return nullptr;
// Must be called with lifecycle >= compositing clean.
// Must be called with lifecycle >= compositing clean
#if DCHECK_IS_ON()
if (RuntimeEnabledFeatures::CompositingOptimizationsEnabled()) {
DCHECK_GE(GetDocument()->Lifecycle().GetState(),
DocumentLifecycle::kPrePaintClean);
} else {
DCHECK_GE(GetDocument()->Lifecycle().GetState(),
DocumentLifecycle::kCompositingAssignmentsClean);
}
#endif
PaintLayer* layer = ToLayoutBox(layout_object_)->Layer();
......
......@@ -716,4 +716,9 @@ void WebRuntimeFeatures::EnableContentIndex(bool enable) {
void WebRuntimeFeatures::EnableRestrictGamepadAccess(bool enable) {
RuntimeEnabledFeatures::SetRestrictGamepadAccessEnabled(enable);
}
void WebRuntimeFeatures::EnableCompositingOptimizations(bool enable) {
RuntimeEnabledFeatures::SetCompositingOptimizationsEnabled(enable);
}
} // namespace blink
......@@ -107,9 +107,12 @@
"inspector-protocol/dom-snapshot",
"media/stable",
"webexposed",
"wpt_internal/origin-isolation"],
"wpt_internal/origin-isolation",
"compositing/filters"
],
"args": ["--stable-release-mode",
"--disable-auto-wpt-origin-isolation"]
"--disable-auto-wpt-origin-isolation",
"--enable-blink-features=CompositingOptimizations"]
},
{
"prefix": "feature-policy-permissions",
......
......@@ -11,19 +11,6 @@
"position": [-100, -100],
"bounds": [200, 200],
"transform": 1
},
{
"name": "LayoutNGBlockFlow (positioned) DIV id='software-parent'",
"bounds": [100, 100],
"contentsOpaque": true,
"backgroundColor": "#008000"
},
{
"name": "LayoutNGBlockFlow (positioned) DIV id='software-child'",
"position": [100, 100],
"bounds": [50, 50],
"contentsOpaque": true,
"backgroundColor": "#0000FF"
}
],
"transforms": [
......
{
"layers": [
{
"name": "Scrolling Contents Layer",
"bounds": [800, 600],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF"
},
{
"name": "LayoutNGBlockFlow (positioned) DIV id='composited-parent'",
"position": [-100, -100],
"bounds": [200, 200],
"transform": 1
},
{
"name": "LayoutNGBlockFlow (positioned) DIV id='software-parent'",
"bounds": [100, 100],
"contentsOpaque": true,
"backgroundColor": "#008000"
},
{
"name": "LayoutNGBlockFlow (positioned) DIV id='software-child'",
"position": [100, 100],
"bounds": [50, 50],
"contentsOpaque": true,
"backgroundColor": "#0000FF"
}
],
"transforms": [
{
"id": 1,
"transform": [
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[330, 330, 0, 1]
]
}
]
}
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