Commit 5e792fff authored by c.shu@samsung.com's avatar c.shu@samsung.com

Replace compile time guard with runtime flag in blink and remove...

Replace compile time guard with runtime flag in blink and remove ENABLE_FAST_MOBILE_SCROLLING in gyp file.

The effort needs to be done in 3 steps:
1. Create the runtime flag interface in blink;
2. Enable the flag for Android from chromium even it does not do anything in blink;
3. Replace compile time guard with runtime flag in blink and remove ENABLE_FAST_MOBILE_SCROLLING in gyp file.

This is the 3rd set of changes.

BUG=381391

Review URL: https://codereview.chromium.org/323123004

git-svn-id: svn://svn.chromium.org/blink/trunk@175967 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 93e8d1f9
......@@ -52,7 +52,6 @@
}],
['OS=="android"', {
'feature_defines': [
'ENABLE_FAST_MOBILE_SCROLLING=1',
'ENABLE_MEDIA_CAPTURE=1'
],
}, { # OS!="android"
......
......@@ -65,7 +65,6 @@ if (use_concatenated_impulse_responses) {
if (is_android) {
feature_defines_list += [
"ENABLE_FAST_MOBILE_SCROLLING=1",
"ENABLE_MEDIA_CAPTURE=1",
]
} else {
......
......@@ -1005,15 +1005,15 @@ void RenderBoxModelObject::calculateBackgroundImageGeometry(const RenderLayerMod
// FIXME: transforms spec says that fixed backgrounds behave like scroll inside transforms.
bool fixedAttachment = fillLayer->attachment() == FixedBackgroundAttachment;
#if ENABLE(FAST_MOBILE_SCROLLING)
if (view()->frameView() && view()->frameView()->shouldAttemptToScrollUsingFastPath()) {
if (RuntimeEnabledFeatures::fastMobileScrollingEnabled()
&& view()->frameView()
&& view()->frameView()->shouldAttemptToScrollUsingFastPath()) {
// As a side effect of an optimization to blit on scroll, we do not honor the CSS
// property "background-attachment: fixed" because it may result in rendering
// artifacts. Note, these artifacts only appear if we are blitting on scroll of
// a page that has fixed background images.
fixedAttachment = false;
}
#endif
if (!fixedAttachment) {
geometry.setDestRect(snappedPaintRect);
......
......@@ -2235,14 +2235,13 @@ void RenderObject::styleWillChange(StyleDifference diff, const RenderStyle& newS
if (view()->frameView()) {
bool shouldBlitOnFixedBackgroundImage = false;
#if ENABLE(FAST_MOBILE_SCROLLING)
// 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;
#endif
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();
......
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