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

Side by Side Diff: Source/core/rendering/compositing/CompositingReasonFinder.cpp

Issue 476273003: Rename acceleratedCompositingForFixedPosition to preferCompositingToLCDText. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rm-fixedpos: rebase Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/Settings.in ('k') | Source/web/WebSettingsImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/rendering/compositing/CompositingReasonFinder.h" 6 #include "core/rendering/compositing/CompositingReasonFinder.h"
7 7
8 #include "core/CSSPropertyNames.h" 8 #include "core/CSSPropertyNames.h"
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
(...skipping 17 matching lines...) Expand all
28 28
29 Settings& settings = m_renderView.document().page()->settings(); 29 Settings& settings = m_renderView.document().page()->settings();
30 if (settings.compositedScrollingForFramesEnabled()) 30 if (settings.compositedScrollingForFramesEnabled())
31 m_compositingTriggers |= ScrollableInnerFrameTrigger; 31 m_compositingTriggers |= ScrollableInnerFrameTrigger;
32 32
33 // We map both these settings to universal overlow scrolling. 33 // We map both these settings to universal overlow scrolling.
34 // FIXME: Replace these settings with a generic compositing setting for High DPI. 34 // FIXME: Replace these settings with a generic compositing setting for High DPI.
35 if (settings.acceleratedCompositingForOverflowScrollEnabled() || settings.co mpositorDrivenAcceleratedScrollingEnabled()) 35 if (settings.acceleratedCompositingForOverflowScrollEnabled() || settings.co mpositorDrivenAcceleratedScrollingEnabled())
36 m_compositingTriggers |= OverflowScrollTrigger; 36 m_compositingTriggers |= OverflowScrollTrigger;
37 37
38 if (settings.acceleratedCompositingForFixedPositionEnabled()) 38 if (settings.preferCompositingToLCDTextEnabled())
39 m_compositingTriggers |= ViewportConstrainedPositionedTrigger; 39 m_compositingTriggers |= ViewportConstrainedPositionedTrigger;
40 } 40 }
41 41
42 bool CompositingReasonFinder::hasOverflowScrollTrigger() const 42 bool CompositingReasonFinder::hasOverflowScrollTrigger() const
43 { 43 {
44 return m_compositingTriggers & OverflowScrollTrigger; 44 return m_compositingTriggers & OverflowScrollTrigger;
45 } 45 }
46 46
47 bool CompositingReasonFinder::isMainFrame() const 47 bool CompositingReasonFinder::isMainFrame() const
48 { 48 {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 bool CompositingReasonFinder::requiresCompositingForPositionFixed(const RenderLa yer* layer) const 169 bool CompositingReasonFinder::requiresCompositingForPositionFixed(const RenderLa yer* layer) const
170 { 170 {
171 if (!(m_compositingTriggers & ViewportConstrainedPositionedTrigger)) 171 if (!(m_compositingTriggers & ViewportConstrainedPositionedTrigger))
172 return false; 172 return false;
173 // Don't promote fixed position elements that are descendants of a non-view container, e.g. transformed elements. 173 // Don't promote fixed position elements that are descendants of a non-view container, e.g. transformed elements.
174 // They will stay fixed wrt the container rather than the enclosing frame. 174 // They will stay fixed wrt the container rather than the enclosing frame.
175 return layer->scrollsWithViewport() && m_renderView.frameView()->isScrollabl e(); 175 return layer->scrollsWithViewport() && m_renderView.frameView()->isScrollabl e();
176 } 176 }
177 177
178 } 178 }
OLDNEW
« no previous file with comments | « Source/core/frame/Settings.in ('k') | Source/web/WebSettingsImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698