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

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

Issue 1826013002: Enable compositing for opaque scrolling content on low DPI screens (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable feature by default, not enabled in dev builds Created 4 years, 5 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 cb5500a93959ed72957af3adadf0b1c9d534d3bc..2303e74519c2fb0f0b51799e085a66128869b8b2 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -221,8 +221,7 @@ GraphicsLayer* PaintLayerScrollableArea::layerForScrollCorner() const
bool PaintLayerScrollableArea::shouldUseIntegerScrollOffset() const
{
- Frame* frame = box().frame();
- if (frame->settings() && !frame->settings()->preferCompositingToLCDTextEnabled())
+ if (m_needsCompositedScrolling)
return true;
return ScrollableArea::shouldUseIntegerScrollOffset();
@@ -1494,13 +1493,18 @@ static bool layerNeedsCompositedScrolling(PaintLayerScrollableArea::LCDTextMode
if (node && node->isElementNode() && (toElement(node)->compositorMutableProperties() & (CompositorMutableProperty::kScrollTop | CompositorMutableProperty::kScrollLeft)))
return true;
- if (mode == PaintLayerScrollableArea::ConsiderLCDText && !layer->compositor()->preferCompositingToLCDTextEnabled())
+ if (mode == PaintLayerScrollableArea::ConsiderLCDText
+ && !layer->compositor()->preferCompositingToLCDTextEnabled()
+ && (!RuntimeEnabledFeatures::compositeOpaqueScrollersEnabled()
+ || layer->layoutObject()->style()->visitedDependentColor(CSSPropertyBackgroundColor).hasAlpha()))
return false;
- return !layer->size().isEmpty()
- && !layer->hasDescendantWithClipPath()
- && !layer->hasAncestorWithClipPath()
- && !layer->layoutObject()->style()->hasBorderRadius();
+ return !(layer->size().isEmpty()
+ || layer->hasDescendantWithClipPath()
+ || layer->hasAncestorWithClipPath()
+ || layer->layoutObject()->isFloating()
+ || layer->layoutObject()->style()->hasBorderRadius()
+ || layer->layoutObject()->style()->hasBorderDecoration());
flackr 2016/07/27 22:17:27 Why can we not use composited scrolling with a bor
Stephen Chennney 2016/07/28 13:55:38 Dashed borders are broken in tests because we don'
flackr 2016/07/28 14:24:25 Understood, sounds good. Can we land these as a se
Stephen Chennney 2016/07/28 14:50:47 I'm not sure what you mean. Do you mean leave out
flackr 2016/07/28 14:55:15 Yes, basically, we can land these extra conditions
}
void PaintLayerScrollableArea::updateNeedsCompositedScrolling(LCDTextMode mode)

Powered by Google App Engine
This is Rietveld 408576698