Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(649)

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Issue 2434443005: Only automatically promote scrollers which are untransformed and opaque. (Closed)
Patch Set: Force compositing to test scrolling contents background painting Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
index 7cbd81dc74e4404feba55bb499b63e868d9f8966..a8f063bea3e1e686645853cfb19922bfb73978ba 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -1684,15 +1684,16 @@ static bool layerNeedsCompositedScrolling(
CompositorMutableProperty::kScrollLeft)))
return true;
- // TODO(schenney): LCD Text also requires integer scroll offsets for the
- // layer. While we use integer scroll offsets locally when
- // !layer->compositor()->preferCompositingToLCDTextEnabled(), we do not check
- // offsets accumulated from the root (including translates). crbug.com/644833
+ // TODO(flackr): Allow integer transforms as long as all of the ancestor
+ // transforms are also integer.
bool backgroundSupportsLCDText =
RuntimeEnabledFeatures::compositeOpaqueScrollersEnabled() &&
layer->canPaintBackgroundOntoScrollingContentsLayer() &&
layer->backgroundIsKnownToBeOpaqueInRect(
- toLayoutBox(layer->layoutObject())->paddingBoxRect());
+ toLayoutBox(layer->layoutObject())->paddingBoxRect()) &&
+ !layer->transformAncestor() && !layer->transform() &&
+ !layer->opacityAncestor() &&
+ !layer->layoutObject()->style()->hasOpacity();
if (mode == PaintLayerScrollableArea::ConsiderLCDText &&
!layer->compositor()->preferCompositingToLCDTextEnabled() &&
!backgroundSupportsLCDText)

Powered by Google App Engine
This is Rietveld 408576698