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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 updateBackgroundLayer(false); | 204 updateBackgroundLayer(false); |
205 updateMaskLayer(false); | 205 updateMaskLayer(false); |
206 updateChildClippingMaskLayer(false); | 206 updateChildClippingMaskLayer(false); |
207 updateScrollingLayers(false); | 207 updateScrollingLayers(false); |
208 updateSquashingLayers(false); | 208 updateSquashingLayers(false); |
209 destroyGraphicsLayers(); | 209 destroyGraphicsLayers(); |
210 } | 210 } |
211 | 211 |
212 PassOwnPtr<GraphicsLayer> CompositedLayerMapping::createGraphicsLayer(Compositin
gReasons reasons, SquashingDisallowedReasons squashingDisallowedReasons) | 212 PassOwnPtr<GraphicsLayer> CompositedLayerMapping::createGraphicsLayer(Compositin
gReasons reasons, SquashingDisallowedReasons squashingDisallowedReasons) |
213 { | 213 { |
214 GraphicsLayerFactory* graphicsLayerFactory = nullptr; | 214 OwnPtr<GraphicsLayer> graphicsLayer = GraphicsLayer::create(this); |
215 if (Page* page = layoutObject()->frame()->page()) | |
216 graphicsLayerFactory = page->chromeClient().graphicsLayerFactory(); | |
217 | |
218 OwnPtr<GraphicsLayer> graphicsLayer = GraphicsLayer::create(graphicsLayerFac
tory, this); | |
219 | 215 |
220 graphicsLayer->setCompositingReasons(reasons); | 216 graphicsLayer->setCompositingReasons(reasons); |
221 graphicsLayer->setSquashingDisallowedReasons(squashingDisallowedReasons); | 217 graphicsLayer->setSquashingDisallowedReasons(squashingDisallowedReasons); |
222 if (Node* owningNode = m_owningLayer.layoutObject()->generatingNode()) | 218 if (Node* owningNode = m_owningLayer.layoutObject()->generatingNode()) |
223 graphicsLayer->setOwnerNodeId(DOMNodeIds::idForNode(owningNode)); | 219 graphicsLayer->setOwnerNodeId(DOMNodeIds::idForNode(owningNode)); |
224 | 220 |
225 return graphicsLayer.release(); | 221 return graphicsLayer.release(); |
226 } | 222 } |
227 | 223 |
228 void CompositedLayerMapping::createPrimaryGraphicsLayer() | 224 void CompositedLayerMapping::createPrimaryGraphicsLayer() |
(...skipping 2318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2547 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2543 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
2548 name = "Scrolling Contents Layer"; | 2544 name = "Scrolling Contents Layer"; |
2549 } else { | 2545 } else { |
2550 ASSERT_NOT_REACHED(); | 2546 ASSERT_NOT_REACHED(); |
2551 } | 2547 } |
2552 | 2548 |
2553 return name; | 2549 return name; |
2554 } | 2550 } |
2555 | 2551 |
2556 } // namespace blink | 2552 } // namespace blink |
OLD | NEW |