| OLD | NEW |
| 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/dom/Document.h" | 8 #include "core/dom/Document.h" |
| 9 #include "core/frame/FrameView.h" | 9 #include "core/frame/FrameView.h" |
| 10 #include "core/frame/Settings.h" | 10 #include "core/frame/Settings.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 if (settings.compositedScrollingForFramesEnabled()) | 33 if (settings.compositedScrollingForFramesEnabled()) |
| 34 m_compositingTriggers |= ScrollableInnerFrameTrigger; | 34 m_compositingTriggers |= ScrollableInnerFrameTrigger; |
| 35 if (settings.acceleratedCompositingForFiltersEnabled()) | 35 if (settings.acceleratedCompositingForFiltersEnabled()) |
| 36 m_compositingTriggers |= FilterTrigger; | 36 m_compositingTriggers |= FilterTrigger; |
| 37 | 37 |
| 38 // We map both these settings to universal overlow scrolling. | 38 // We map both these settings to universal overlow scrolling. |
| 39 // FIXME: Replace these settings with a generic compositing setting for High
DPI. | 39 // FIXME: Replace these settings with a generic compositing setting for High
DPI. |
| 40 if (settings.acceleratedCompositingForOverflowScrollEnabled() || settings.co
mpositorDrivenAcceleratedScrollingEnabled()) | 40 if (settings.acceleratedCompositingForOverflowScrollEnabled() || settings.co
mpositorDrivenAcceleratedScrollingEnabled()) |
| 41 m_compositingTriggers |= OverflowScrollTrigger; | 41 m_compositingTriggers |= OverflowScrollTrigger; |
| 42 | 42 |
| 43 // FIXME: acceleratedCompositingForFixedPositionEnabled should be renamed ac
celeratedCompositingForViewportConstrainedPositionEnabled(). | |
| 44 // Or the sticky and fixed position elements should be behind different flag
s. | |
| 45 if (settings.acceleratedCompositingForFixedPositionEnabled()) | 43 if (settings.acceleratedCompositingForFixedPositionEnabled()) |
| 46 m_compositingTriggers |= ViewportConstrainedPositionedTrigger; | 44 m_compositingTriggers |= ViewportConstrainedPositionedTrigger; |
| 47 } | 45 } |
| 48 | 46 |
| 49 bool CompositingReasonFinder::hasOverflowScrollTrigger() const | 47 bool CompositingReasonFinder::hasOverflowScrollTrigger() const |
| 50 { | 48 { |
| 51 return m_compositingTriggers & OverflowScrollTrigger; | 49 return m_compositingTriggers & OverflowScrollTrigger; |
| 52 } | 50 } |
| 53 | 51 |
| 54 bool CompositingReasonFinder::isMainFrame() const | 52 bool CompositingReasonFinder::isMainFrame() const |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 if (viewportConstrainedNotCompositedReason) | 254 if (viewportConstrainedNotCompositedReason) |
| 257 *viewportConstrainedNotCompositedReason = RenderLayer::NotCompos
itedForBoundsOutOfView; | 255 *viewportConstrainedNotCompositedReason = RenderLayer::NotCompos
itedForBoundsOutOfView; |
| 258 return false; | 256 return false; |
| 259 } | 257 } |
| 260 } | 258 } |
| 261 | 259 |
| 262 return true; | 260 return true; |
| 263 } | 261 } |
| 264 | 262 |
| 265 } | 263 } |
| OLD | NEW |