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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 bool showRepaintCounter = false; | 136 bool showRepaintCounter = false; |
137 bool forceCompositingMode = false; | 137 bool forceCompositingMode = false; |
138 | 138 |
139 if (Settings* settings = m_renderView->document()->settings()) { | 139 if (Settings* settings = m_renderView->document()->settings()) { |
140 hasAcceleratedCompositing = settings->acceleratedCompositingEnabled(); | 140 hasAcceleratedCompositing = settings->acceleratedCompositingEnabled(); |
141 showDebugBorders = settings->showDebugBorders(); | 141 showDebugBorders = settings->showDebugBorders(); |
142 showRepaintCounter = settings->showRepaintCounter(); | 142 showRepaintCounter = settings->showRepaintCounter(); |
143 forceCompositingMode = settings->forceCompositingMode() && hasAccelerate
dCompositing; | 143 forceCompositingMode = settings->forceCompositingMode() && hasAccelerate
dCompositing; |
144 | 144 |
145 if (forceCompositingMode && m_renderView->document()->ownerElement()) | 145 if (forceCompositingMode && m_renderView->document()->ownerElement()) |
146 forceCompositingMode = requiresCompositingForScrollableFrame(); | 146 forceCompositingMode = settings->acceleratedCompositingForScrollable
FramesEnabled() && requiresCompositingForScrollableFrame(); |
147 } | 147 } |
148 | 148 |
149 // We allow the chrome to override the settings, in case the page is rendere
d | 149 // We allow the chrome to override the settings, in case the page is rendere
d |
150 // on a chrome that doesn't allow accelerated compositing. | 150 // on a chrome that doesn't allow accelerated compositing. |
151 if (hasAcceleratedCompositing) { | 151 if (hasAcceleratedCompositing) { |
152 Frame* frame = m_renderView->frameView()->frame(); | 152 Frame* frame = m_renderView->frameView()->frame(); |
153 Page* page = frame ? frame->page() : 0; | 153 Page* page = frame ? frame->page() : 0; |
154 if (page) { | 154 if (page) { |
155 ChromeClient* chromeClient = page->chrome()->client(); | 155 ChromeClient* chromeClient = page->chrome()->client(); |
156 m_compositingTriggers = chromeClient->allowedCompositingTriggers(); | 156 m_compositingTriggers = chromeClient->allowedCompositingTriggers(); |
(...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1958 if (!viewLayer->isComposited()) | 1958 if (!viewLayer->isComposited()) |
1959 return; | 1959 return; |
1960 | 1960 |
1961 if (GraphicsLayer* rootLayer = viewLayer->backing()->graphicsLayer()) | 1961 if (GraphicsLayer* rootLayer = viewLayer->backing()->graphicsLayer()) |
1962 rootLayer->noteDeviceOrPageScaleFactorChangedIncludingDescendants(); | 1962 rootLayer->noteDeviceOrPageScaleFactorChangedIncludingDescendants(); |
1963 } | 1963 } |
1964 | 1964 |
1965 } // namespace WebCore | 1965 } // namespace WebCore |
1966 | 1966 |
1967 #endif // USE(ACCELERATED_COMPOSITING) | 1967 #endif // USE(ACCELERATED_COMPOSITING) |
OLD | NEW |