OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 : m_client(client) | 107 : m_client(client) |
108 , m_anchorPoint(0.5f, 0.5f, 0) | 108 , m_anchorPoint(0.5f, 0.5f, 0) |
109 , m_opacity(1) | 109 , m_opacity(1) |
110 , m_zPosition(0) | 110 , m_zPosition(0) |
111 , m_contentsOpaque(false) | 111 , m_contentsOpaque(false) |
112 , m_preserves3D(false) | 112 , m_preserves3D(false) |
113 , m_backfaceVisibility(true) | 113 , m_backfaceVisibility(true) |
114 , m_masksToBounds(false) | 114 , m_masksToBounds(false) |
115 , m_drawsContent(false) | 115 , m_drawsContent(false) |
116 , m_contentsVisible(true) | 116 , m_contentsVisible(true) |
117 , m_maintainsPixelAlignment(false) | |
118 , m_showDebugBorder(false) | 117 , m_showDebugBorder(false) |
119 , m_showRepaintCounter(false) | 118 , m_showRepaintCounter(false) |
120 , m_paintingPhase(GraphicsLayerPaintAllWithOverflowClip) | 119 , m_paintingPhase(GraphicsLayerPaintAllWithOverflowClip) |
121 , m_contentsOrientation(CompositingCoordinatesTopDown) | 120 , m_contentsOrientation(CompositingCoordinatesTopDown) |
122 , m_parent(0) | 121 , m_parent(0) |
123 , m_maskLayer(0) | 122 , m_maskLayer(0) |
124 , m_replicaLayer(0) | 123 , m_replicaLayer(0) |
125 , m_replicatedLayer(0) | 124 , m_replicatedLayer(0) |
126 , m_repaintCount(0) | 125 , m_repaintCount(0) |
127 , m_contentsLayer(0) | 126 , m_contentsLayer(0) |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 break; | 319 break; |
321 } | 320 } |
322 } | 321 } |
323 | 322 |
324 setParent(0); | 323 setParent(0); |
325 } | 324 } |
326 | 325 |
327 platformLayer()->removeFromParent(); | 326 platformLayer()->removeFromParent(); |
328 } | 327 } |
329 | 328 |
330 void GraphicsLayer::noteDeviceOrPageScaleFactorChangedIncludingDescendants() | |
331 { | |
332 deviceOrPageScaleFactorChanged(); | |
333 | |
334 if (m_maskLayer) | |
335 m_maskLayer->deviceOrPageScaleFactorChanged(); | |
336 | |
337 if (m_replicaLayer) | |
338 m_replicaLayer->noteDeviceOrPageScaleFactorChangedIncludingDescendants()
; | |
339 | |
340 const Vector<GraphicsLayer*>& childLayers = children(); | |
341 size_t numChildren = childLayers.size(); | |
342 for (size_t i = 0; i < numChildren; ++i) | |
343 childLayers[i]->noteDeviceOrPageScaleFactorChangedIncludingDescendants()
; | |
344 } | |
345 | |
346 void GraphicsLayer::setReplicatedByLayer(GraphicsLayer* layer) | 329 void GraphicsLayer::setReplicatedByLayer(GraphicsLayer* layer) |
347 { | 330 { |
348 // FIXME: this could probably be a full early exit. | 331 // FIXME: this could probably be a full early exit. |
349 if (m_replicaLayer != layer) { | 332 if (m_replicaLayer != layer) { |
350 if (m_replicaLayer) | 333 if (m_replicaLayer) |
351 m_replicaLayer->setReplicatedLayer(0); | 334 m_replicaLayer->setReplicatedLayer(0); |
352 | 335 |
353 if (layer) | 336 if (layer) |
354 layer->setReplicatedLayer(this); | 337 layer->setReplicatedLayer(this); |
355 | 338 |
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1459 #ifndef NDEBUG | 1442 #ifndef NDEBUG |
1460 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer) | 1443 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer) |
1461 { | 1444 { |
1462 if (!layer) | 1445 if (!layer) |
1463 return; | 1446 return; |
1464 | 1447 |
1465 String output = layer->layerTreeAsText(LayerTreeAsTextDebug | LayerTreeAsTex
tIncludeVisibleRects); | 1448 String output = layer->layerTreeAsText(LayerTreeAsTextDebug | LayerTreeAsTex
tIncludeVisibleRects); |
1466 fprintf(stderr, "%s\n", output.utf8().data()); | 1449 fprintf(stderr, "%s\n", output.utf8().data()); |
1467 } | 1450 } |
1468 #endif | 1451 #endif |
OLD | NEW |