Changeset 87762 in webkit
- Timestamp:
- May 31, 2011 4:49:22 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r87758 r87762 1 2011-05-27 Adrienne Walker <enne@google.com> 2 3 Reviewed by James Robinson. 4 5 [chromium] Fix crash from empty reflections with masks 6 https://bugs.webkit.org/show_bug.cgi?id=61654 7 8 * compositing/reflections/empty-reflection-with-mask-expected.txt: Added. 9 * compositing/reflections/empty-reflection-with-mask.html: Added. 10 1 11 2011-05-31 Berend-Jan Wever <skylined@chromium.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r87758 r87762 1 2011-05-27 Adrienne Walker <enne@google.com> 2 3 Reviewed by James Robinson. 4 5 [chromium] Fix crash from empty reflections with masks 6 https://bugs.webkit.org/show_bug.cgi?id=61654 7 8 Change the iteration for updateCompositorResources to match that being 9 done in the paint and draw steps. This mismatch of iteration style 10 was causing layers with replica masks to correctly get skipped while 11 painting but not get skipped during texture upload. 12 13 Test: compositing/reflections/empty-reflection-with-mask.html 14 15 * platform/graphics/chromium/LayerRendererChromium.cpp: 16 (WebCore::LayerRendererChromium::updateLayers): 17 (WebCore::LayerRendererChromium::updateCompositorResources): 18 * platform/graphics/chromium/LayerRendererChromium.h: 19 1 20 2011-05-31 B.J. Wever <skylined@chromium.org> 2 21 -
trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
r87409 r87762 331 331 #endif 332 332 333 // FIXME: Before updateCompositorResources Recursive, when the compositor runs in333 // FIXME: Before updateCompositorResources, when the compositor runs in 334 334 // its own thread, and when the copyTexImage2D bug is fixed, insert 335 335 // a glWaitLatch(Compositor->Offscreen) on all child contexts here instead 336 // of after updateCompositorResources Recursive.336 // of after updateCompositorResources. 337 337 // Also uncomment the glSetLatch(Compositor->Offscreen) code in addChildContext. 338 338 // if (hardwareCompositing() && m_contextSupportsLatch) { … … 348 348 // } 349 349 350 updateCompositorResources Recursive(m_rootLayer.get());350 updateCompositorResources(renderSurfaceLayerList); 351 351 // Update compositor resources for root layer. 352 352 m_rootLayerContentTiler->updateRect(); 353 353 354 // After updateCompositorResources Recursive, set/wait latches for all child354 // After updateCompositorResources, set/wait latches for all child 355 355 // contexts. This will prevent the compositor from using any of the child 356 356 // parent textures while WebGL commands are executing from javascript *and* … … 855 855 } 856 856 857 void LayerRendererChromium::updateCompositorResourcesRecursive(LayerChromium* layer) 858 { 859 const Vector<RefPtr<LayerChromium> >& children = layer->children(); 860 for (size_t i = 0; i < children.size(); ++i) 861 updateCompositorResourcesRecursive(children[i].get()); 857 void LayerRendererChromium::updateCompositorResources(const LayerList& renderSurfaceLayerList) 858 { 859 for (int surfaceIndex = renderSurfaceLayerList.size() - 1; surfaceIndex >= 0 ; --surfaceIndex) { 860 CCLayerImpl* renderSurfaceLayer = renderSurfaceLayerList[surfaceIndex].get(); 861 RenderSurfaceChromium* renderSurface = renderSurfaceLayer->renderSurface(); 862 ASSERT(renderSurface); 863 864 if (!renderSurface->m_layerList.size()) 865 continue; 866 867 LayerList& layerList = renderSurface->m_layerList; 868 ASSERT(layerList.size()); 869 for (unsigned layerIndex = 0; layerIndex < layerList.size(); ++layerIndex) { 870 CCLayerImpl* ccLayerImpl = layerList[layerIndex].get(); 871 if (ccLayerImpl->renderSurface() && ccLayerImpl->renderSurface() != renderSurface) 872 continue; 873 874 updateCompositorResources(ccLayerImpl); 875 } 876 } 877 } 878 879 void LayerRendererChromium::updateCompositorResources(CCLayerImpl* ccLayerImpl) 880 { 881 LayerChromium* layer = ccLayerImpl->owner(); 862 882 863 883 if (layer->bounds().isEmpty()) … … 865 885 866 886 if (layer->maskLayer()) 867 updateCompositorResources Recursive(layer->maskLayer());887 updateCompositorResources(ccLayerImpl->maskLayer()); 868 888 if (layer->replicaLayer()) 869 updateCompositorResourcesRecursive(layer->replicaLayer()); 870 871 CCLayerImpl* drawLayer = layer->ccLayerImpl(); 872 873 if (drawLayer->drawsContent()) 874 drawLayer->updateCompositorResources(); 875 876 layer->pushPropertiesTo(drawLayer); 889 updateCompositorResources(ccLayerImpl->replicaLayer()); 890 891 if (ccLayerImpl->drawsContent()) 892 ccLayerImpl->updateCompositorResources(); 893 894 layer->pushPropertiesTo(ccLayerImpl); 877 895 } 878 896 -
trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h
r87167 r87762 168 168 169 169 void paintLayerContents(const LayerList&); 170 void updateCompositorResourcesRecursive(LayerChromium*); 170 void updateCompositorResources(const LayerList& renderSurfaceLayerList); 171 void updateCompositorResources(CCLayerImpl*); 171 172 172 173 void drawLayers(const LayerList& renderSurfaceLayerList);
Note: See TracChangeset
for help on using the changeset viewer.