Changeset 269159 in webkit
- Timestamp:
- Oct 29, 2020, 11:35:59 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/canvas/canvas-draw-canvas-on-canvas-flushing-order-expected.html (added)
-
LayoutTests/fast/canvas/canvas-draw-canvas-on-canvas-flushing-order.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp (modified) (2 diffs)
-
Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h (modified) (2 diffs)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r269155 r269159 1 2020-10-29 Said Abou-Hallawa <said@apple.com> 2 3 REGRESSION(269065): [GPU Process]: Order of drawing has to be preserved when drawing a canvas to another canvas 4 https://bugs.webkit.org/show_bug.cgi?id=218324 5 6 Reviewed by Simon Fraser. 7 8 * fast/canvas/canvas-draw-canvas-on-canvas-flushing-order-expected.html: Added. 9 * fast/canvas/canvas-draw-canvas-on-canvas-flushing-order.html: Added. 10 1 11 2020-10-29 Noam Rosenthal <noam@webkit.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r269155 r269159 1 2020-10-29 Said Abou-Hallawa <said@apple.com> 2 3 REGRESSION(269065): [GPU Process]: Order of drawing has to be preserved when drawing a canvas to another canvas 4 https://bugs.webkit.org/show_bug.cgi?id=218324 5 6 Reviewed by Simon Fraser. 7 8 Allow DisplayList::Recorder::Delegate to take an action after appending 9 a DisplayList::Item to its DisplayList::DisplayList. 10 11 Test: fast/canvas/canvas-draw-canvas-on-canvas-flushing-order.html 12 13 * platform/graphics/displaylists/DisplayListRecorder.cpp: 14 (WebCore::DisplayList::Recorder::didAppendItem): 15 (WebCore::DisplayList::Recorder::appendItemAndUpdateExtent): 16 (WebCore::DisplayList::Recorder::appendItem): 17 * platform/graphics/displaylists/DisplayListRecorder.h: 18 (WebCore::DisplayList::Recorder::Delegate::didAppendItem): 19 1 20 2020-10-29 Noam Rosenthal <noam@webkit.org> 2 21 -
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp
r269092 r269159 126 126 } 127 127 128 void Recorder::didAppendItem(const Item& item) 129 { 130 if (m_delegate) 131 m_delegate->didAppendItem(item); 132 } 133 128 134 void Recorder::updateState(const GraphicsContextState& state, GraphicsContextState::StateChangeFlags flags) 129 135 { … … 448 454 void Recorder::appendItemAndUpdateExtent(Ref<DrawingItem>&& item) 449 455 { 450 auto& newItem = appendItem(WTFMove(item)); 456 DrawingItem& newItem = item.get(); 457 appendItem(WTFMove(item)); 451 458 updateItemExtent(newItem); 452 459 } 453 460 454 template<typename ItemType> 455 ItemType& Recorder::appendItem(Ref<ItemType>&& item) 456 { 461 void Recorder::appendItem(Ref<Item>&& item) 462 { 463 Item& newItem = item.get(); 457 464 willAppendItem(item.get()); 458 return downcast<ItemType>(m_displayList.append(WTFMove(item))); 465 m_displayList.append(WTFMove(item)); 466 didAppendItem(newItem); 459 467 } 460 468 -
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
r269092 r269159 69 69 virtual bool lockRemoteImageBuffer(WebCore::ImageBuffer&) { return false; } 70 70 virtual void willAppendItem(const Item&) { }; 71 virtual void didAppendItem(const Item&) { }; 71 72 }; 72 73 … … 148 149 FloatRect roundToDevicePixels(const FloatRect&, GraphicsContext::RoundingMode) override; 149 150 150 template<typename ItemType> 151 ItemType& appendItem(Ref<ItemType>&&); 151 void appendItem(Ref<Item>&&); 152 152 void willAppendItem(const Item&); 153 void didAppendItem(const Item&); 153 154 154 155 void appendStateChangeItem(const GraphicsContextStateChange&, GraphicsContextState::StateChangeFlags); -
trunk/Source/WebKit/ChangeLog
r269154 r269159 1 2020-10-29 Said Abou-Hallawa <said@apple.com> 2 3 REGRESSION(269065): [GPU Process]: Order of drawing has to be preserved when drawing a canvas to another canvas 4 https://bugs.webkit.org/show_bug.cgi?id=218324 5 6 Reviewed by Simon Fraser. 7 8 When drawing an ImageBuffer to another ImageBuffer, the DrawingContext of 9 the source and the destination ImageBuffers have to be flushed immediately. 10 Otherwise an older version or a newer version of the source ImageBuffer 11 might be drawn to the destination ImageBuffer. 12 13 * WebProcess/GPU/graphics/RemoteImageBufferProxy.h: 14 1 15 2020-10-29 Ryan Haddad <ryanhaddad@apple.com> 2 16 -
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h
r269123 r269159 165 165 if (!m_remoteRenderingBackendProxy) 166 166 return false; 167 return m_remoteRenderingBackendProxy->remoteResourceCacheProxy().lockRemoteImageBufferForRemoteClient(imageBuffer, m_renderingResourceIdentifier); 167 if (!m_remoteRenderingBackendProxy->remoteResourceCacheProxy().lockRemoteImageBufferForRemoteClient(imageBuffer, m_renderingResourceIdentifier)) 168 return false; 169 imageBuffer.flushDrawingContext(); 170 return true; 168 171 } 169 172 … … 179 182 } 180 183 184 void didAppendItem(const WebCore::DisplayList::Item& item) override 185 { 186 if (item.type() == WebCore::DisplayList::ItemType::DrawImageBuffer) 187 flushDrawingContext(); 188 } 189 181 190 DisplayListFlushIdentifier m_sentFlushIdentifier; 182 191 DisplayListFlushIdentifier m_receivedFlushIdentifier;
Note:
See TracChangeset
for help on using the changeset viewer.