Commit 3fbd23bf authored by Xianzhu Wang's avatar Xianzhu Wang Committed by Commit Bot

Temporarily disable text-on-opaque optimization

This is to evaluate the performance improvement of the optimization in
1 or 2 canary builds. Will revert after that.

This disables the optimization for composited scrolling added in
crrev.com/771292 (based on the LCD-text on opaque optimization added
in crrev.com/768555).

Bug: 1113269
Change-Id: I20250169241d8f6d99e9bd917974aaf3fd0f675a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2351400
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797498}
parent 1139cdc4
......@@ -403,8 +403,8 @@ TEST_F(NonCompositedMainThreadScrollingReasonsTest, ClipTest) {
}
TEST_F(NonCompositedMainThreadScrollingReasonsTest, ClipPathTest) {
TestNonCompositedReasons("clip-path",
cc::MainThreadScrollingReason::kNotScrollingOnMain);
TestNonCompositedReasons(
"clip-path", cc::MainThreadScrollingReason::kNotOpaqueForTextAndLCDText);
}
TEST_F(NonCompositedMainThreadScrollingReasonsTest, BoxShadowTest) {
......@@ -424,8 +424,9 @@ TEST_F(NonCompositedMainThreadScrollingReasonsTest, StackingContextTest) {
}
TEST_F(NonCompositedMainThreadScrollingReasonsTest, BorderRadiusTest) {
TestNonCompositedReasons("border-radius",
cc::MainThreadScrollingReason::kNotScrollingOnMain);
TestNonCompositedReasons(
"border-radius",
cc::MainThreadScrollingReason::kNotOpaqueForTextAndLCDText);
}
TEST_F(NonCompositedMainThreadScrollingReasonsTest,
......
......@@ -1834,6 +1834,8 @@ TEST_P(UnifiedScrollingSimTest,
// embedded in an iframe, by loading a document with an iframe that has a
// scroller with an inset box shadow, and ensuring that scroller generates a
// compositor scroll node with the proper noncomposited reasons set.
// TODO(crbug.com/1113269): Temporarily disabled.
#if 0
TEST_P(UnifiedScrollingSimTest, ScrollNodeForEmbeddedScrollers) {
SimRequest request("https://example.com/test.html", "text/html");
LoadURL("https://example.com/test.html");
......@@ -1914,6 +1916,7 @@ TEST_P(UnifiedScrollingSimTest, ScrollNodeForEmbeddedScrollers) {
->property_trees()
->scroll_tree.IsComposited(*child_scroll_node));
}
#endif
// Similar to the above test, but for deeper nesting iframes to ensure we
// generate scroll nodes that are deeper than the main frame's children.
......
......@@ -2544,6 +2544,18 @@ bool PaintLayerScrollableArea::ComputeNeedsCompositedScrolling(
return needs_composited_scrolling;
}
static bool IsOpaqueForLCDText(const PaintLayer& layer, const LayoutBox& box) {
if (RuntimeEnabledFeatures::CompositeAfterPaintEnabled())
return box.TextIsKnownToBeOnOpaqueBackground();
// TODO(crbug.com/1113269): TextIsKnownToBeOnOpaqueBackground() is temporarily
// replaced with BackgroundIsKnownToBeOpaqueInRect() to evaluate the
// performance improvement. Will restore after 1 or 2 canary builds.
DisableCompositingQueryAsserts disabler;
return layer.BackgroundIsKnownToBeOpaqueInRect(box.PhysicalPaddingBoxRect(),
true);
}
bool PaintLayerScrollableArea::ComputeNeedsCompositedScrollingInternal(
BackgroundPaintLocation background_paint_location_if_composited,
bool force_prefer_compositing_to_lcd_text) {
......@@ -2589,7 +2601,8 @@ bool PaintLayerScrollableArea::ComputeNeedsCompositedScrollingInternal(
cc::MainThreadScrollingReason::kHasTransformAndLCDText;
needs_composited_scrolling = false;
}
if (!box->TextIsKnownToBeOnOpaqueBackground()) {
if (!IsOpaqueForLCDText(*layer_, *box)) {
non_composited_main_thread_scrolling_reasons_ |=
cc::MainThreadScrollingReason::kNotOpaqueForTextAndLCDText;
needs_composited_scrolling = false;
......
......@@ -565,7 +565,8 @@ void GraphicsLayer::SetContentsOpaque(bool opaque) {
}
void GraphicsLayer::SetContentsOpaqueForText(bool opaque) {
CcLayer().SetContentsOpaqueForText(opaque);
// TODO(crbug.com/1113269): Temporarily disable this optimization.
// CcLayer().SetContentsOpaqueForText(opaque);
}
void GraphicsLayer::SetHitTestable(bool should_hit_test) {
......
......@@ -118,6 +118,36 @@ crbug.com/759632 http/tests/devtools/network/network-datasaver-warning.js [ Fail
# display-lock
# Some additional bugs that are caused by painting problems are also within this section.
# TODO(crbug.com/1113629): Temporary disable these test for the experiment
crbug.com/1113629 compositing/contents-opaque/overflow-hidden-child-layers.html [ Failure ]
crbug.com/1113629 compositing/geometry/foreground-layer.html [ Failure ]
crbug.com/1113629 compositing/iframes/become-composited-nested-iframes.html [ Failure ]
crbug.com/1113629 compositing/iframes/become-overlapped-iframe.html [ Failure ]
crbug.com/1113629 compositing/iframes/composited-parent-iframe.html [ Failure ]
crbug.com/1113629 compositing/iframes/connect-compositing-iframe-delayed.html [ Failure ]
crbug.com/1113629 compositing/iframes/connect-compositing-iframe.html [ Failure ]
crbug.com/1113629 compositing/iframes/connect-compositing-iframe2.html [ Failure ]
crbug.com/1113629 compositing/iframes/connect-compositing-iframe3.html [ Failure ]
crbug.com/1113629 compositing/iframes/enter-compositing-iframe.html [ Failure ]
crbug.com/1113629 compositing/iframes/iframe-resize.html [ Failure ]
crbug.com/1113629 compositing/iframes/iframe-size-from-zero.html [ Failure ]
crbug.com/1113629 compositing/iframes/invisible-nested-iframe-show.html [ Failure ]
crbug.com/1113629 compositing/iframes/overlapped-iframe-iframe.html [ Failure ]
crbug.com/1113629 compositing/iframes/overlapped-iframe.html [ Failure ]
crbug.com/1113629 compositing/iframes/overlapped-nested-iframes.html [ Failure ]
crbug.com/1113629 compositing/iframes/resizer.html [ Failure ]
crbug.com/1113629 compositing/iframes/scrolling-iframe.html [ Failure ]
crbug.com/1113629 compositing/rtl/rtl-iframe-absolute-overflow-scrolled.html [ Failure ]
crbug.com/1113629 compositing/rtl/rtl-iframe-absolute-overflow.html [ Failure ]
crbug.com/1113629 compositing/rtl/rtl-iframe-absolute.html [ Failure ]
crbug.com/1113629 compositing/rtl/rtl-iframe-fixed-overflow-scrolled.html [ Failure ]
crbug.com/1113629 compositing/rtl/rtl-iframe-fixed-overflow.html [ Failure Crash ]
crbug.com/1113629 compositing/rtl/rtl-iframe-fixed.html [ Failure ]
crbug.com/1113629 fast/sub-pixel/transformed-iframe-copy-on-scroll.html [ Failure ]
crbug.com/1113629 paint/invalidation/compositing/overlap-test-with-filter.html [ Failure ]
crbug.com/1113629 paint/invalidation/scroll/composited-iframe-scroll-repaint.html [ Failure ]
crbug.com/1113629 paint/invalidation/scroll/repaint-during-scroll-with-zoom.html [ Failure ]
# --- Begin CompositeAfterPaint Tests --
# Only whitelisted tests run under the virtual suite.
# More tests run with CompositeAfterPaint on the flag-specific try bot.
......
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