Changeset 132394 in webkit
- Timestamp:
- Oct 24, 2012, 1:36:02 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r132388 r132394 1 2012-10-24 Simon Fraser <simon.fraser@apple.com> 2 3 Fix CALayer hiearchy when combining tiling with preserve-3d 4 https://bugs.webkit.org/show_bug.cgi?id=100205 5 6 Reviewed by Dean Jackson. 7 8 Pixel test that tests backface-visibility on a tile cache layer. Mark the test as 9 failing on Chromium. 10 11 * compositing/tiling/backface-preserve-3d-tiled-expected.png: Added. 12 * compositing/tiling/backface-preserve-3d-tiled-expected.txt: Added. 13 * compositing/tiling/backface-preserve-3d-tiled.html: Added. 14 * platform/chromium/TestExpectations: 15 1 16 2012-10-24 Rick Byers <rbyers@chromium.org> 2 17 -
trunk/LayoutTests/platform/chromium/TestExpectations
r132378 r132394 2819 2819 webkit.org/b/98315 css3/compositing/blend-mode-property.html [ Failure ] 2820 2820 webkit.org/b/98315 css3/compositing/should-have-compositing-layer.html [ Failure ] 2821 webkit.org/b/100205 compositing/tiling/backface-preserve-3d-tiled.html [ Failure ] 2821 2822 2822 2823 # two regions reftests failing on Chromium -
trunk/Source/WebCore/ChangeLog
r132393 r132394 1 2012-10-24 Simon Fraser <simon.fraser@apple.com> 2 3 Fix CALayer hiearchy when combining tiling with preserve-3d 4 https://bugs.webkit.org/show_bug.cgi?id=100205 5 6 Reviewed by Dean Jackson. 7 8 When an element has "transform-style: preserve-3d", its GraphicsLayerCA has a 9 m_structuralLayer which is a CATransformLayer. The primary CALayer which contains rendered 10 content becomes a sublayer of the CATransformLayer. If the element has backface-visibility:hidden, 11 it is the primary layer that is set to be single-sided. 12 13 In r131940 we started to use TileCaches in place of CATiledLayer. TileCaches work via 14 "customSublayers" returned from the PlatformCALayer, where the custom sublayer is 15 the tile cache container layer. However, the custom sublayers were being added as 16 children of the structural (CATransformLayer) layer, not of the primary (CALayer) layer, 17 thus they were not affected by the doubleSided property. 18 19 This change cleans up the confusing code in GraphicsLayerCA::updateSublayerList() 20 by maintaining two vectors of PlatformCALayers, one for sublayers of the structural 21 layer, and one for sublayers of the primary layer. It adds custom sublayers to 22 the latter list, so now the tile cache container layer becomes a sublayer of 23 the primary layer, so is affected by that layer's doubleSided property. 24 25 Test: compositing/tiling/backface-preserve-3d-tiled.html 26 27 * platform/graphics/ca/GraphicsLayerCA.cpp: 28 (WebCore::GraphicsLayerCA::updateSublayerList): 29 1 30 2012-10-23 Zhenyao Mo <zmo@google.com> 2 31 -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
r132301 r132394 1185 1185 void GraphicsLayerCA::updateSublayerList() 1186 1186 { 1187 PlatformCALayerList newSublayers; 1187 const PlatformCALayerList* customSublayers = m_layer->customSublayers(); 1188 1189 PlatformCALayerList structuralLayerChildren; 1190 PlatformCALayerList primaryLayerChildren; 1191 1192 PlatformCALayerList& childListForSublayers = m_structuralLayer ? structuralLayerChildren : primaryLayerChildren; 1193 1194 if (customSublayers) 1195 primaryLayerChildren.append(*customSublayers); 1196 1197 if (m_structuralLayer) { 1198 if (m_replicaLayer) 1199 structuralLayerChildren.append(static_cast<GraphicsLayerCA*>(m_replicaLayer)->primaryLayer()); 1200 1201 structuralLayerChildren.append(m_layer); 1202 } 1203 1204 if (m_contentsLayer && m_contentsVisible) { 1205 // FIXME: add the contents layer in the correct order with negative z-order children. 1206 // This does not cause visible rendering issues because currently contents layers are only used 1207 // for replaced elements that don't have children. 1208 primaryLayerChildren.append(m_contentsLayer); 1209 } 1210 1188 1211 const Vector<GraphicsLayer*>& childLayers = children(); 1189 1190 if (const PlatformCALayerList* customSublayers = m_layer->customSublayers()) 1191 newSublayers.appendRange(customSublayers->begin(), customSublayers->end()); 1192 1193 if (m_structuralLayer || m_contentsLayer || childLayers.size() > 0) { 1194 if (m_structuralLayer) { 1195 // Add the replica layer first. 1196 if (m_replicaLayer) 1197 newSublayers.append(static_cast<GraphicsLayerCA*>(m_replicaLayer)->primaryLayer()); 1198 // Add the primary layer. Even if we have negative z-order children, the primary layer always comes behind. 1199 newSublayers.append(m_layer); 1200 } else if (m_contentsLayer && m_contentsVisible) { 1201 // FIXME: add the contents layer in the correct order with negative z-order children. 1202 // This does not cause visible rendering issues because currently contents layers are only used 1203 // for replaced elements that don't have children. 1204 newSublayers.append(m_contentsLayer); 1205 } 1206 1207 size_t numChildren = childLayers.size(); 1208 for (size_t i = 0; i < numChildren; ++i) { 1209 GraphicsLayerCA* curChild = static_cast<GraphicsLayerCA*>(childLayers[i]); 1210 PlatformCALayer* childLayer = curChild->layerForSuperlayer(); 1211 newSublayers.append(childLayer); 1212 } 1213 1214 for (size_t i = 0; i < newSublayers.size(); --i) 1215 newSublayers[i]->removeFromSuperlayer(); 1216 } 1217 1212 size_t numChildren = childLayers.size(); 1213 for (size_t i = 0; i < numChildren; ++i) { 1214 GraphicsLayerCA* curChild = static_cast<GraphicsLayerCA*>(childLayers[i]); 1215 PlatformCALayer* childLayer = curChild->layerForSuperlayer(); 1216 childListForSublayers.append(childLayer); 1217 } 1218 1218 1219 #ifdef VISIBLE_TILE_WASH 1219 1220 if (m_visibleTileWashLayer) 1220 newSublayers.append(m_visibleTileWashLayer);1221 childListForSublayers.append(m_visibleTileWashLayer); 1221 1222 #endif 1222 1223 1223 if (m_structuralLayer) { 1224 m_structuralLayer->setSublayers(newSublayers); 1225 1226 if (m_contentsLayer) { 1227 // If we have a transform layer, then the contents layer is parented in the 1228 // primary layer (which is itself a child of the transform layer). 1229 m_layer->removeAllSublayers(); 1230 if (m_contentsVisible) 1231 m_layer->appendSublayer(m_contentsLayer.get()); 1232 } 1233 } else 1234 m_layer->setSublayers(newSublayers); 1224 if (m_structuralLayer) 1225 m_structuralLayer->setSublayers(structuralLayerChildren); 1226 1227 m_layer->setSublayers(primaryLayerChildren); 1235 1228 } 1236 1229
Note:
See TracChangeset
for help on using the changeset viewer.