| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 2011 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 2298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2309 bool CompositedLayerMapping::needsRepaint(const GraphicsLayer& graphicsLayer) co
nst | 2309 bool CompositedLayerMapping::needsRepaint(const GraphicsLayer& graphicsLayer) co
nst |
| 2310 { | 2310 { |
| 2311 return isScrollableAreaLayer(&graphicsLayer) ? true : m_owningLayer.needsRep
aint(); | 2311 return isScrollableAreaLayer(&graphicsLayer) ? true : m_owningLayer.needsRep
aint(); |
| 2312 } | 2312 } |
| 2313 | 2313 |
| 2314 void CompositedLayerMapping::paintContents(const GraphicsLayer* graphicsLayer, G
raphicsContext& context, | 2314 void CompositedLayerMapping::paintContents(const GraphicsLayer* graphicsLayer, G
raphicsContext& context, |
| 2315 GraphicsLayerPaintingPhase graphicsLayerPaintingPhase, const IntRect& intere
stRect) const | 2315 GraphicsLayerPaintingPhase graphicsLayerPaintingPhase, const IntRect& intere
stRect) const |
| 2316 { | 2316 { |
| 2317 // https://code.google.com/p/chromium/issues/detail?id=343772 | 2317 // https://code.google.com/p/chromium/issues/detail?id=343772 |
| 2318 DisableCompositingQueryAsserts disabler; | 2318 DisableCompositingQueryAsserts disabler; |
| 2319 // Allow throttling to make sure no painting paths (e.g., |
| 2320 // ContentLayerDelegate::paintContents) try to paint throttled content. |
| 2321 DocumentLifecycle::AllowThrottlingScope allowThrottling(m_owningLayer.layout
Object()->document().lifecycle()); |
| 2319 #if ENABLE(ASSERT) | 2322 #if ENABLE(ASSERT) |
| 2320 // FIXME: once the state machine is ready, this can be removed and we can re
fer to that instead. | 2323 // FIXME: once the state machine is ready, this can be removed and we can re
fer to that instead. |
| 2321 if (Page* page = layoutObject()->frame()->page()) | 2324 if (Page* page = layoutObject()->frame()->page()) |
| 2322 page->setIsPainting(true); | 2325 page->setIsPainting(true); |
| 2323 #endif | 2326 #endif |
| 2324 | 2327 |
| 2325 TRACE_EVENT1("devtools.timeline", "Paint", "data", InspectorPaintEvent::data
(m_owningLayer.layoutObject(), LayoutRect(interestRect), graphicsLayer)); | 2328 TRACE_EVENT1("devtools.timeline", "Paint", "data", InspectorPaintEvent::data
(m_owningLayer.layoutObject(), LayoutRect(interestRect), graphicsLayer)); |
| 2326 | 2329 |
| 2327 PaintLayerFlags paintLayerFlags = 0; | 2330 PaintLayerFlags paintLayerFlags = 0; |
| 2328 if (graphicsLayerPaintingPhase & GraphicsLayerPaintBackground) | 2331 if (graphicsLayerPaintingPhase & GraphicsLayerPaintBackground) |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2573 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2576 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
| 2574 name = "Scrolling Contents Layer"; | 2577 name = "Scrolling Contents Layer"; |
| 2575 } else { | 2578 } else { |
| 2576 ASSERT_NOT_REACHED(); | 2579 ASSERT_NOT_REACHED(); |
| 2577 } | 2580 } |
| 2578 | 2581 |
| 2579 return name; | 2582 return name; |
| 2580 } | 2583 } |
| 2581 | 2584 |
| 2582 } // namespace blink | 2585 } // namespace blink |
| OLD | NEW |