Changeset 270006 in webkit
- Timestamp:
- Nov 18, 2020 6:53:43 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r270002 r270006 1 2020-11-18 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Rename MetaCommandSwitchTo to MetaCommandSwitchToItemBuffer 4 https://bugs.webkit.org/show_bug.cgi?id=219130 5 6 Reviewed by Tim Horton. 7 8 Rename MetaCommandSwitchTo to MetaCommandSwitchToItemBuffer. The new name helps to clarify that this item is 9 about changing or swapping between display list item buffers, rather than image buffers. 10 11 * platform/graphics/displaylists/DisplayList.cpp: 12 (WebCore::DisplayList::DisplayList::append): 13 * platform/graphics/displaylists/DisplayListItemBuffer.cpp: 14 (WebCore::DisplayList::ItemHandle::apply): 15 (WebCore::DisplayList::ItemHandle::destroy): 16 (WebCore::DisplayList::ItemHandle::copyTo const): 17 (WebCore::DisplayList::ItemBuffer::swapWritableBufferIfNeeded): 18 * platform/graphics/displaylists/DisplayListItemType.cpp: 19 (WebCore::DisplayList::sizeOfItemInBytes): 20 (WebCore::DisplayList::isDrawingItem): 21 (WebCore::DisplayList::isInlineItem): 22 * platform/graphics/displaylists/DisplayListItemType.h: 23 * platform/graphics/displaylists/DisplayListItems.cpp: 24 (WebCore::DisplayList::operator<<): 25 * platform/graphics/displaylists/DisplayListItems.h: 26 (WebCore::DisplayList::MetaCommandSwitchToItemBuffer::MetaCommandSwitchToItemBuffer): 27 (WebCore::DisplayList::MetaCommandSwitchTo::MetaCommandSwitchTo): Deleted. 28 (WebCore::DisplayList::MetaCommandSwitchTo::identifier const): Deleted. 29 1 30 2020-11-18 Wenson Hsieh <wenson_hsieh@apple.com> 2 31 -
trunk/Source/WebCore/platform/graphics/displaylists/DisplayList.cpp
r270002 r270006 279 279 case ItemType::FlushContext: 280 280 return append<FlushContext>(item.get<FlushContext>()); 281 case ItemType::MetaCommandSwitchTo :282 return append<MetaCommandSwitchTo >(item.get<MetaCommandSwitchTo>());281 case ItemType::MetaCommandSwitchToItemBuffer: 282 return append<MetaCommandSwitchToItemBuffer>(item.get<MetaCommandSwitchToItemBuffer>()); 283 283 case ItemType::PutImageData: 284 284 return append<PutImageData>(item.get<PutImageData>()); -
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItemBuffer.cpp
r269753 r270006 227 227 return; 228 228 } 229 case ItemType::MetaCommandSwitchTo :229 case ItemType::MetaCommandSwitchToItemBuffer: 230 230 return; 231 231 case ItemType::PutImageData: { … … 455 455 return; 456 456 } 457 case ItemType::MetaCommandSwitchTo : {458 static_assert(std::is_trivially_destructible<MetaCommandSwitchTo >::value);457 case ItemType::MetaCommandSwitchToItemBuffer: { 458 static_assert(std::is_trivially_destructible<MetaCommandSwitchToItemBuffer>::value); 459 459 return; 460 460 } … … 706 706 return; 707 707 } 708 case ItemType::MetaCommandSwitchTo : {709 new (itemOffset) MetaCommandSwitchTo (get<MetaCommandSwitchTo>());708 case ItemType::MetaCommandSwitchToItemBuffer: { 709 new (itemOffset) MetaCommandSwitchToItemBuffer(get<MetaCommandSwitchToItemBuffer>()); 710 710 return; 711 711 } … … 861 861 void ItemBuffer::swapWritableBufferIfNeeded(size_t numberOfBytes) 862 862 { 863 auto sizeForBufferSwitchItem = paddedSizeOfTypeAndItemInBytes(ItemType::MetaCommandSwitchTo );863 auto sizeForBufferSwitchItem = paddedSizeOfTypeAndItemInBytes(ItemType::MetaCommandSwitchToItemBuffer); 864 864 if (m_writtenNumberOfBytes + numberOfBytes + sizeForBufferSwitchItem <= m_writableBuffer.capacity) 865 865 return; … … 868 868 bool hadPreviousBuffer = m_writableBuffer; 869 869 if (hadPreviousBuffer) 870 uncheckedAppend<MetaCommandSwitchTo >(nextBuffer.identifier);870 uncheckedAppend<MetaCommandSwitchToItemBuffer>(nextBuffer.identifier); 871 871 auto previousBuffer = std::exchange(m_writableBuffer, { }); 872 872 previousBuffer.capacity = std::exchange(m_writtenNumberOfBytes, 0); -
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItemType.cpp
r269753 r270006 127 127 case ItemType::FlushContext: 128 128 return sizeof(FlushContext); 129 case ItemType::MetaCommandSwitchTo :130 return sizeof(MetaCommandSwitchTo );129 case ItemType::MetaCommandSwitchToItemBuffer: 130 return sizeof(MetaCommandSwitchToItemBuffer); 131 131 case ItemType::PutImageData: 132 132 return sizeof(PutImageData); … … 181 181 case ItemType::ConcatenateCTM: 182 182 case ItemType::FlushContext: 183 case ItemType::MetaCommandSwitchTo :183 case ItemType::MetaCommandSwitchToItemBuffer: 184 184 case ItemType::Restore: 185 185 case ItemType::Rotate: … … 292 292 case ItemType::FillRect: 293 293 case ItemType::FlushContext: 294 case ItemType::MetaCommandSwitchTo :294 case ItemType::MetaCommandSwitchToItemBuffer: 295 295 case ItemType::PaintFrameForMedia: 296 296 case ItemType::Restore: -
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItemType.h
r269724 r270006 77 77 FillEllipse, 78 78 FlushContext, 79 MetaCommandSwitchTo ,79 MetaCommandSwitchToItemBuffer, 80 80 PutImageData, 81 81 PaintFrameForMedia, -
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp
r269753 r270006 1003 1003 } 1004 1004 1005 static TextStream& operator<<(TextStream& ts, const MetaCommandSwitchTo & item)1005 static TextStream& operator<<(TextStream& ts, const MetaCommandSwitchToItemBuffer& item) 1006 1006 { 1007 1007 ts.dumpProperty("identifier", item.identifier()); … … 1058 1058 case ItemType::FillEllipse: ts << "fill-ellipse"; break; 1059 1059 case ItemType::FlushContext: ts << "flush-context"; break; 1060 case ItemType::MetaCommandSwitchTo : ts << "meta-command-switch-to"; break;1060 case ItemType::MetaCommandSwitchToItemBuffer: ts << "meta-command-switch-to-item-buffer"; break; 1061 1061 case ItemType::PutImageData: ts << "put-image-data"; break; 1062 1062 case ItemType::PaintFrameForMedia: ts << "paint-frame-for-media"; break; … … 1214 1214 ts << item.get<FlushContext>(); 1215 1215 break; 1216 case ItemType::MetaCommandSwitchTo :1217 ts << item.get<MetaCommandSwitchTo >();1216 case ItemType::MetaCommandSwitchToItemBuffer: 1217 ts << item.get<MetaCommandSwitchToItemBuffer>(); 1218 1218 break; 1219 1219 case ItemType::PutImageData: -
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h
r269753 r270006 2234 2234 // FIXME: This should be refactored so that the command to "switch to the next item buffer" 2235 2235 // is not itself a drawing item. 2236 class MetaCommandSwitchTo {2237 public: 2238 static constexpr ItemType itemType = ItemType::MetaCommandSwitchTo ;2239 static constexpr bool isInlineItem = true; 2240 static constexpr bool isDrawingItem = false; 2241 2242 MetaCommandSwitchTo (ItemBufferIdentifier identifier)2236 class MetaCommandSwitchToItemBuffer { 2237 public: 2238 static constexpr ItemType itemType = ItemType::MetaCommandSwitchToItemBuffer; 2239 static constexpr bool isInlineItem = true; 2240 static constexpr bool isDrawingItem = false; 2241 2242 MetaCommandSwitchToItemBuffer(ItemBufferIdentifier identifier) 2243 2243 : m_identifier(identifier) 2244 2244 { … … 2308 2308 WebCore::DisplayList::ItemType::FillEllipse, 2309 2309 WebCore::DisplayList::ItemType::FlushContext, 2310 WebCore::DisplayList::ItemType::MetaCommandSwitchTo ,2310 WebCore::DisplayList::ItemType::MetaCommandSwitchToItemBuffer, 2311 2311 WebCore::DisplayList::ItemType::PutImageData, 2312 2312 WebCore::DisplayList::ItemType::PaintFrameForMedia, -
trunk/Source/WebKit/ChangeLog
r270002 r270006 1 2020-11-18 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Rename MetaCommandSwitchTo to MetaCommandSwitchToItemBuffer 4 https://bugs.webkit.org/show_bug.cgi?id=219130 5 6 Reviewed by Tim Horton. 7 8 * GPUProcess/graphics/RemoteImageBuffer.h: 9 * GPUProcess/graphics/RemoteRenderingBackend.cpp: 10 (WebKit::RemoteRenderingBackend::decodeItem): 11 * WebProcess/GPU/graphics/RemoteImageBufferProxy.h: 12 1 13 2020-11-18 Wenson Hsieh <wenson_hsieh@apple.com> 2 14 -
trunk/Source/WebKit/GPUProcess/graphics/RemoteImageBuffer.h
r270002 r270006 93 93 } 94 94 95 if (item.is<WebCore::DisplayList::MetaCommandSwitchTo >()) {96 auto nextBufferIdentifier = item.get<WebCore::DisplayList::MetaCommandSwitchTo >().identifier();95 if (item.is<WebCore::DisplayList::MetaCommandSwitchToItemBuffer>()) { 96 auto nextBufferIdentifier = item.get<WebCore::DisplayList::MetaCommandSwitchToItemBuffer>().identifier(); 97 97 m_remoteRenderingBackend.setNextItemBufferToRead(nextBufferIdentifier); 98 98 return true; -
trunk/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp
r270002 r270006 316 316 case DisplayList::ItemType::FillRect: 317 317 case DisplayList::ItemType::FlushContext: 318 case DisplayList::ItemType::MetaCommandSwitchTo :318 case DisplayList::ItemType::MetaCommandSwitchToItemBuffer: 319 319 case DisplayList::ItemType::PaintFrameForMedia: 320 320 case DisplayList::ItemType::Restore: -
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h
r270002 r270006 306 306 case WebCore::DisplayList::ItemType::FillRect: 307 307 case WebCore::DisplayList::ItemType::FlushContext: 308 case WebCore::DisplayList::ItemType::MetaCommandSwitchTo :308 case WebCore::DisplayList::ItemType::MetaCommandSwitchToItemBuffer: 309 309 case WebCore::DisplayList::ItemType::PaintFrameForMedia: 310 310 case WebCore::DisplayList::ItemType::Restore: -
trunk/Tools/ChangeLog
r270004 r270006 1 2020-11-18 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Rename MetaCommandSwitchTo to MetaCommandSwitchToItemBuffer 4 https://bugs.webkit.org/show_bug.cgi?id=219130 5 6 Reviewed by Tim Horton. 7 8 * TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp: 9 (TestWebKitAPI::TEST): 10 1 11 2020-11-18 Jonathan Bedard <jbedard@apple.com> 2 12 -
trunk/Tools/TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp
r270002 r270006 122 122 } 123 123 #endif 124 case ItemType::MetaCommandSwitchTo :124 case ItemType::MetaCommandSwitchToItemBuffer: 125 125 break; 126 126 default: {
Note: See TracChangeset
for help on using the changeset viewer.