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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 , m_isTrackingRepaints(false) | 212 , m_isTrackingRepaints(false) |
213 , m_rootLayerAttachment(RootLayerUnattached) | 213 , m_rootLayerAttachment(RootLayerUnattached) |
214 { | 214 { |
215 } | 215 } |
216 | 216 |
217 RenderLayerCompositor::~RenderLayerCompositor() | 217 RenderLayerCompositor::~RenderLayerCompositor() |
218 { | 218 { |
219 ASSERT(m_rootLayerAttachment == RootLayerUnattached); | 219 ASSERT(m_rootLayerAttachment == RootLayerUnattached); |
220 } | 220 } |
221 | 221 |
222 void RenderLayerCompositor::enableCompositingMode(bool enable /* = true */) | 222 void RenderLayerCompositor::enableCompositingMode(bool enable) |
223 { | 223 { |
224 if (enable != m_compositing) { | 224 if (enable == m_compositing) |
225 m_compositing = enable; | 225 return; |
226 | 226 |
227 if (m_compositing) { | 227 m_compositing = enable; |
228 ensureRootLayer(); | 228 |
229 notifyIFramesOfCompositingChange(); | 229 if (m_compositing) |
230 } else | 230 ensureRootLayer(); |
231 destroyRootLayer(); | 231 else |
232 } | 232 destroyRootLayer(); |
| 233 |
| 234 notifyIFramesOfCompositingChange(); |
233 } | 235 } |
234 | 236 |
235 void RenderLayerCompositor::cacheAcceleratedCompositingFlags() | 237 void RenderLayerCompositor::cacheAcceleratedCompositingFlags() |
236 { | 238 { |
237 bool hasAcceleratedCompositing = false; | 239 bool hasAcceleratedCompositing = false; |
238 bool showRepaintCounter = false; | 240 bool showRepaintCounter = false; |
239 bool forceCompositingMode = false; | 241 bool forceCompositingMode = false; |
240 | 242 |
241 if (Settings* settings = m_renderView.document().settings()) { | 243 if (Settings* settings = m_renderView.document().settings()) { |
242 hasAcceleratedCompositing = settings->acceleratedCompositingEnabled(); | 244 hasAcceleratedCompositing = settings->acceleratedCompositingEnabled(); |
(...skipping 1997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2240 } else if (graphicsLayer == m_scrollLayer.get()) { | 2242 } else if (graphicsLayer == m_scrollLayer.get()) { |
2241 name = "LocalFrame Scrolling Layer"; | 2243 name = "LocalFrame Scrolling Layer"; |
2242 } else { | 2244 } else { |
2243 ASSERT_NOT_REACHED(); | 2245 ASSERT_NOT_REACHED(); |
2244 } | 2246 } |
2245 | 2247 |
2246 return name; | 2248 return name; |
2247 } | 2249 } |
2248 | 2250 |
2249 } // namespace WebCore | 2251 } // namespace WebCore |
OLD | NEW |