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 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1230 void CompositedLayerMapping::updateDrawsContent() | 1230 void CompositedLayerMapping::updateDrawsContent() |
1231 { | 1231 { |
1232 bool hasPaintedContent = containsPaintedContent(); | 1232 bool hasPaintedContent = containsPaintedContent(); |
1233 m_graphicsLayer->setDrawsContent(hasPaintedContent); | 1233 m_graphicsLayer->setDrawsContent(hasPaintedContent); |
1234 | 1234 |
1235 if (m_scrollingLayer) { | 1235 if (m_scrollingLayer) { |
1236 // m_scrollingLayer never has backing store. | 1236 // m_scrollingLayer never has backing store. |
1237 // m_scrollingContentsLayer only needs backing store if the scrolled con
tents need to paint. | 1237 // m_scrollingContentsLayer only needs backing store if the scrolled con
tents need to paint. |
1238 m_scrollingContentsAreEmpty = !m_owningLayer.hasVisibleContent() || !(la
youtObject()->hasBackground() || paintsChildren()); | 1238 m_scrollingContentsAreEmpty = !m_owningLayer.hasVisibleContent() || !(la
youtObject()->hasBackground() || paintsChildren()); |
1239 m_scrollingContentsLayer->setDrawsContent(!m_scrollingContentsAreEmpty); | 1239 m_scrollingContentsLayer->setDrawsContent(!m_scrollingContentsAreEmpty); |
| 1240 m_graphicsLayer->setCanUseClientCacheStatus(false); |
| 1241 m_scrollingContentsLayer->setCanUseClientCacheStatus(true); |
1240 updateScrollingBlockSelection(); | 1242 updateScrollingBlockSelection(); |
| 1243 } else { |
| 1244 m_graphicsLayer->setCanUseClientCacheStatus(true); |
1241 } | 1245 } |
1242 | 1246 |
1243 if (hasPaintedContent && isAcceleratedCanvas(layoutObject())) { | 1247 if (hasPaintedContent && isAcceleratedCanvas(layoutObject())) { |
1244 CanvasRenderingContext* context = toHTMLCanvasElement(layoutObject()->no
de())->renderingContext(); | 1248 CanvasRenderingContext* context = toHTMLCanvasElement(layoutObject()->no
de())->renderingContext(); |
1245 // Content layer may be null if context is lost. | 1249 // Content layer may be null if context is lost. |
1246 if (WebLayer* contentLayer = context->platformLayer()) { | 1250 if (WebLayer* contentLayer = context->platformLayer()) { |
1247 Color bgColor(Color::transparent); | 1251 Color bgColor(Color::transparent); |
1248 if (contentLayerSupportsDirectBackgroundComposition(layoutObject()))
{ | 1252 if (contentLayerSupportsDirectBackgroundComposition(layoutObject()))
{ |
1249 bgColor = layoutObjectBackgroundColor(); | 1253 bgColor = layoutObjectBackgroundColor(); |
1250 hasPaintedContent = false; | 1254 hasPaintedContent = false; |
(...skipping 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2598 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { | 2602 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { |
2599 name = "Scrolling Block Selection Layer"; | 2603 name = "Scrolling Block Selection Layer"; |
2600 } else { | 2604 } else { |
2601 ASSERT_NOT_REACHED(); | 2605 ASSERT_NOT_REACHED(); |
2602 } | 2606 } |
2603 | 2607 |
2604 return name; | 2608 return name; |
2605 } | 2609 } |
2606 | 2610 |
2607 } // namespace blink | 2611 } // namespace blink |
OLD | NEW |