| 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 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1161 updateScrollingBlockSelection(); | 1161 updateScrollingBlockSelection(); |
| 1162 } | 1162 } |
| 1163 | 1163 |
| 1164 if (hasPaintedContent && isAcceleratedCanvas(renderer())) { | 1164 if (hasPaintedContent && isAcceleratedCanvas(renderer())) { |
| 1165 CanvasRenderingContext* context = toHTMLCanvasElement(renderer()->node()
)->renderingContext(); | 1165 CanvasRenderingContext* context = toHTMLCanvasElement(renderer()->node()
)->renderingContext(); |
| 1166 // Content layer may be null if context is lost. | 1166 // Content layer may be null if context is lost. |
| 1167 if (WebLayer* contentLayer = context->platformLayer()) { | 1167 if (WebLayer* contentLayer = context->platformLayer()) { |
| 1168 Color bgColor(Color::transparent); | 1168 Color bgColor(Color::transparent); |
| 1169 if (contentLayerSupportsDirectBackgroundComposition(renderer())) { | 1169 if (contentLayerSupportsDirectBackgroundComposition(renderer())) { |
| 1170 bgColor = rendererBackgroundColor(); | 1170 bgColor = rendererBackgroundColor(); |
| 1171 hasPaintedContent = false; |
| 1171 } | 1172 } |
| 1172 contentLayer->setBackgroundColor(bgColor.rgb()); | 1173 contentLayer->setBackgroundColor(bgColor.rgb()); |
| 1173 } | 1174 } |
| 1174 } | 1175 } |
| 1175 | 1176 |
| 1176 // FIXME: we could refine this to only allocate backings for one of these la
yers if possible. | 1177 // FIXME: we could refine this to only allocate backings for one of these la
yers if possible. |
| 1177 if (m_foregroundLayer) | 1178 if (m_foregroundLayer) |
| 1178 m_foregroundLayer->setDrawsContent(hasPaintedContent); | 1179 m_foregroundLayer->setDrawsContent(hasPaintedContent); |
| 1179 | 1180 |
| 1180 if (m_backgroundLayer) | 1181 if (m_backgroundLayer) |
| (...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2348 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { | 2349 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { |
| 2349 name = "Scrolling Block Selection Layer"; | 2350 name = "Scrolling Block Selection Layer"; |
| 2350 } else { | 2351 } else { |
| 2351 ASSERT_NOT_REACHED(); | 2352 ASSERT_NOT_REACHED(); |
| 2352 } | 2353 } |
| 2353 | 2354 |
| 2354 return name; | 2355 return name; |
| 2355 } | 2356 } |
| 2356 | 2357 |
| 2357 } // namespace blink | 2358 } // namespace blink |
| OLD | NEW |