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

Unified Diff: sky/engine/core/rendering/RenderObject.cpp

Issue 661633003: Get rid of slow repaint objects and main thread scrolling reasons. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: merge to ToT Created 6 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: sky/engine/core/rendering/RenderObject.cpp
diff --git a/sky/engine/core/rendering/RenderObject.cpp b/sky/engine/core/rendering/RenderObject.cpp
index 639fa405d47576fb4154aa1b2dfc84ae47ceb21f..ef6b0c08f764ddcd2e354051f63429f3df7dc625 100644
--- a/sky/engine/core/rendering/RenderObject.cpp
+++ b/sky/engine/core/rendering/RenderObject.cpp
@@ -1838,37 +1838,6 @@ void RenderObject::styleWillChange(StyleDifference diff, const RenderStyle& newS
s_affectsParentBlock = false;
}
- if (view()->frameView()) {
- bool shouldBlitOnFixedBackgroundImage = false;
- if (RuntimeEnabledFeatures::fastMobileScrollingEnabled()) {
- // On low-powered/mobile devices, preventing blitting on a scroll can cause noticeable delays
- // when scrolling a page with a fixed background image. As an optimization, assuming there are
- // no fixed positoned elements on the page, we can acclerate scrolling (via blitting) if we
- // ignore the CSS property "background-attachment: fixed".
- shouldBlitOnFixedBackgroundImage = true;
- }
- bool newStyleSlowScroll = !shouldBlitOnFixedBackgroundImage && newStyle.hasFixedBackgroundImage();
- bool oldStyleSlowScroll = m_style && !shouldBlitOnFixedBackgroundImage && m_style->hasFixedBackgroundImage();
-
- bool drawsRootBackground = isDocumentElement();
- if (drawsRootBackground && !shouldBlitOnFixedBackgroundImage) {
- if (view()->compositor()->supportsFixedRootBackgroundCompositing()) {
- if (newStyleSlowScroll && newStyle.hasEntirelyFixedBackground())
- newStyleSlowScroll = false;
-
- if (oldStyleSlowScroll && m_style->hasEntirelyFixedBackground())
- oldStyleSlowScroll = false;
- }
- }
-
- if (oldStyleSlowScroll != newStyleSlowScroll) {
- if (oldStyleSlowScroll)
- view()->frameView()->removeSlowRepaintObject();
- if (newStyleSlowScroll)
- view()->frameView()->addSlowRepaintObject();
- }
- }
-
// Elements with non-auto touch-action will send a SetTouchAction message
// on touchstart in EventHandler::handleTouchEvent, and so effectively have
// a touchstart handler that must be reported.

Powered by Google App Engine
This is Rietveld 408576698