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 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1194 } | 1194 } |
1195 | 1195 |
1196 void CompositedLayerMapping::updateDrawsContent() | 1196 void CompositedLayerMapping::updateDrawsContent() |
1197 { | 1197 { |
1198 bool hasPaintedContent = containsPaintedContent(); | 1198 bool hasPaintedContent = containsPaintedContent(); |
1199 m_graphicsLayer->setDrawsContent(hasPaintedContent); | 1199 m_graphicsLayer->setDrawsContent(hasPaintedContent); |
1200 | 1200 |
1201 if (m_scrollingLayer) { | 1201 if (m_scrollingLayer) { |
1202 // m_scrollingLayer never has backing store. | 1202 // m_scrollingLayer never has backing store. |
1203 // m_scrollingContentsLayer only needs backing store if the scrolled con
tents need to paint. | 1203 // m_scrollingContentsLayer only needs backing store if the scrolled con
tents need to paint. |
1204 m_scrollingContentsAreEmpty = !m_owningLayer.hasVisibleContent() || !(la
youtObject()->hasBackground() || paintsChildren()); | 1204 m_scrollingContentsAreEmpty = !m_owningLayer.hasVisibleContent() || !(la
youtObject()->hasBackground() || layoutObject()->hasBackdropFilter() || paintsCh
ildren()); |
1205 m_scrollingContentsLayer->setDrawsContent(!m_scrollingContentsAreEmpty); | 1205 m_scrollingContentsLayer->setDrawsContent(!m_scrollingContentsAreEmpty); |
1206 } | 1206 } |
1207 | 1207 |
1208 if (hasPaintedContent && isAcceleratedCanvas(layoutObject())) { | 1208 if (hasPaintedContent && isAcceleratedCanvas(layoutObject())) { |
1209 CanvasRenderingContext* context = toHTMLCanvasElement(layoutObject()->no
de())->renderingContext(); | 1209 CanvasRenderingContext* context = toHTMLCanvasElement(layoutObject()->no
de())->renderingContext(); |
1210 // Content layer may be null if context is lost. | 1210 // Content layer may be null if context is lost. |
1211 if (WebLayer* contentLayer = context->platformLayer()) { | 1211 if (WebLayer* contentLayer = context->platformLayer()) { |
1212 Color bgColor(Color::transparent); | 1212 Color bgColor(Color::transparent); |
1213 if (contentLayerSupportsDirectBackgroundComposition(layoutObject()))
{ | 1213 if (contentLayerSupportsDirectBackgroundComposition(layoutObject()))
{ |
1214 bgColor = layoutObjectBackgroundColor(); | 1214 bgColor = layoutObjectBackgroundColor(); |
(...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2540 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2540 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
2541 name = "Scrolling Contents Layer"; | 2541 name = "Scrolling Contents Layer"; |
2542 } else { | 2542 } else { |
2543 ASSERT_NOT_REACHED(); | 2543 ASSERT_NOT_REACHED(); |
2544 } | 2544 } |
2545 | 2545 |
2546 return name; | 2546 return name; |
2547 } | 2547 } |
2548 | 2548 |
2549 } // namespace blink | 2549 } // namespace blink |
OLD | NEW |