Changeset 151220 in webkit
- Timestamp:
- Jun 5, 2013 6:33:43 AM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r151218 r151220 1 2013-06-05 Gwang Yoon Hwang <ryumiel@company100.net> 2 3 [Coordinated Graphics] Prevent a recursive painting in CoordinatedGraphicsLayer 4 https://bugs.webkit.org/show_bug.cgi?id=117222 5 6 Reviewed by Noam Rosenthal. 7 8 CoordinatedGraphicsLayer::flushCompositingState() will cross frame 9 boundaries if the GraphicsLayers are connected. In this case, 10 updateContentBuffers will invoke a painting of a sub-frame that causes 11 flushCompositingState recursively. 12 13 To prevent this behavior this patch extracts updateContentBuffers from 14 flushCompositingState, and places it in 15 updateContentBuffersIncludeSublayers, which is another tree traveler for 16 painting. 17 18 No new tests, covered by existing tests. 19 20 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: 21 (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly): 22 (WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers): 23 (WebCore::CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayers): 24 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h: 25 1 26 2013-06-05 Andreas Kling <akling@apple.com> 2 27 -
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
r149292 r151220 791 791 syncFilters(); 792 792 #endif 793 updateContentBuffers();794 793 #if USE(GRAPHICS_SURFACE) 795 794 syncCanvas(); 796 795 #endif 797 796 797 // Only unset m_movingVisibleRect after we have updated the visible rect after the animation stopped. 798 if (!hasActiveTransformAnimation) 799 m_movingVisibleRect = false; 800 } 801 802 void CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers() 803 { 798 804 if (m_layerState.hasPendingChanges()) { 799 805 m_coordinator->syncLayerState(m_id, m_layerState); … … 801 807 } 802 808 803 // Only unset m_movingVisibleRect after we have updated the visible rect after the animation stopped. 804 if (!hasActiveTransformAnimation) 805 m_movingVisibleRect = false; 809 for (size_t i = 0; i < children().size(); ++i) 810 toCoordinatedGraphicsLayer(children()[i])->syncPendingStateChangesIncludingSubLayers(); 806 811 } 807 812 … … 994 999 } 995 1000 1001 void CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayers() 1002 { 1003 if (CoordinatedGraphicsLayer* mask = toCoordinatedGraphicsLayer(maskLayer())) 1004 mask->updateContentBuffers(); 1005 1006 if (CoordinatedGraphicsLayer* replica = toCoordinatedGraphicsLayer(replicaLayer())) 1007 replica->updateContentBuffers(); 1008 1009 updateContentBuffers(); 1010 1011 for (size_t i = 0; i < children().size(); ++i) 1012 toCoordinatedGraphicsLayer(children()[i])->updateContentBuffersIncludingSubLayers(); 1013 } 1014 996 1015 void CoordinatedGraphicsLayer::updateContentBuffers() 997 1016 { -
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h
r149292 r151220 112 112 virtual void resumeAnimations() OVERRIDE; 113 113 114 void syncPendingStateChangesIncludingSubLayers(); 115 void updateContentBuffersIncludingSubLayers(); 116 114 117 FloatPoint computePositionRelativeToBase(); 115 118 void computePixelAlignment(FloatPoint& position, FloatSize&, FloatPoint3D& anchorPoint, FloatSize& alignmentOffset); -
trunk/Source/WebKit2/ChangeLog
r151214 r151220 1 2013-06-05 Gwang Yoon Hwang <ryumiel@company100.net> 2 3 [Coordinated Graphics] Prevent a recursive painting in CoordinatedGraphicsLayer 4 https://bugs.webkit.org/show_bug.cgi?id=117222 5 6 Reviewed by Noam Rosenthal. 7 8 CoordinatedGraphicsLayer::flushCompositingState() will cross frame 9 boundaries if the GraphicsLayers are connected. In this case, 10 updateContentBuffers will invoke a painting of a sub-frame that causes 11 flushCompositingState recursively. 12 13 To prevent this behavior this patch extracts updateContentBuffers from 14 flushCompositingState, and places it in 15 updateContentBuffersIncludeSublayers, which traverses the tree 16 separately from flushing the state for painting. 17 18 No new tests, covered by existing tests. 19 20 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: 21 (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges): 22 1 23 2013-06-05 Gwang Yoon Hwang <ryumiel@company100.net> 2 24 -
trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp
r151212 r151220 249 249 bool didSync = m_webPage->corePage()->mainFrame()->view()->flushCompositingStateIncludingSubframes(); 250 250 251 toCoordinatedGraphicsLayer(m_rootLayer.get())->updateContentBuffersIncludingSubLayers(); 252 toCoordinatedGraphicsLayer(m_rootLayer.get())->syncPendingStateChangesIncludingSubLayers(); 253 251 254 flushPendingImageBackingChanges(); 252 255
Note: See TracChangeset
for help on using the changeset viewer.