OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 bool hasAcceleratedCompositing = false; | 145 bool hasAcceleratedCompositing = false; |
146 bool showRepaintCounter = false; | 146 bool showRepaintCounter = false; |
147 bool forceCompositingMode = false; | 147 bool forceCompositingMode = false; |
148 | 148 |
149 if (Settings* settings = m_renderView.document().settings()) { | 149 if (Settings* settings = m_renderView.document().settings()) { |
150 hasAcceleratedCompositing = settings->acceleratedCompositingEnabled(); | 150 hasAcceleratedCompositing = settings->acceleratedCompositingEnabled(); |
151 | 151 |
152 // We allow the chrome to override the settings, in case the page is ren
dered | 152 // We allow the chrome to override the settings, in case the page is ren
dered |
153 // on a chrome that doesn't allow accelerated compositing. | 153 // on a chrome that doesn't allow accelerated compositing. |
154 if (hasAcceleratedCompositing) { | 154 if (hasAcceleratedCompositing) { |
155 if (page()) { | 155 m_compositingReasonFinder.updateTriggers(); |
156 m_compositingReasonFinder.updateTriggers(); | 156 hasAcceleratedCompositing = m_compositingReasonFinder.hasTriggers(); |
157 hasAcceleratedCompositing = m_compositingReasonFinder.hasTrigger
s(); | |
158 } | |
159 } | 157 } |
160 | 158 |
161 showRepaintCounter = settings->showRepaintCounter(); | 159 showRepaintCounter = settings->showRepaintCounter(); |
162 forceCompositingMode = settings->forceCompositingMode() && hasAccelerate
dCompositing; | 160 forceCompositingMode = settings->forceCompositingMode() && hasAccelerate
dCompositing; |
163 | 161 |
164 if (forceCompositingMode && !isMainFrame()) | 162 if (forceCompositingMode && !isMainFrame()) |
165 forceCompositingMode = m_compositingReasonFinder.requiresCompositing
ForScrollableFrame(); | 163 forceCompositingMode = m_compositingReasonFinder.requiresCompositing
ForScrollableFrame(); |
166 } | 164 } |
167 | 165 |
168 if (hasAcceleratedCompositing != m_hasAcceleratedCompositing || showRepaintC
ounter != m_showRepaintCounter || forceCompositingMode != m_forceCompositingMode
) | 166 if (hasAcceleratedCompositing != m_hasAcceleratedCompositing || showRepaintC
ounter != m_showRepaintCounter || forceCompositingMode != m_forceCompositingMode
) |
(...skipping 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1647 } else if (graphicsLayer == m_scrollLayer.get()) { | 1645 } else if (graphicsLayer == m_scrollLayer.get()) { |
1648 name = "LocalFrame Scrolling Layer"; | 1646 name = "LocalFrame Scrolling Layer"; |
1649 } else { | 1647 } else { |
1650 ASSERT_NOT_REACHED(); | 1648 ASSERT_NOT_REACHED(); |
1651 } | 1649 } |
1652 | 1650 |
1653 return name; | 1651 return name; |
1654 } | 1652 } |
1655 | 1653 |
1656 } // namespace WebCore | 1654 } // namespace WebCore |
OLD | NEW |