Changeset 213541 in webkit
- Timestamp:
- Mar 7, 2017 2:23:33 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 7 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r213540 r213541 1 2017-03-07 Dean Jackson <dino@apple.com> 2 3 Add GPUDevice implementation and WebGPULayer 4 https://bugs.webkit.org/show_bug.cgi?id=169219 5 <rdar://problem/30879048> 6 7 Reviewed by Sam Weinig. 8 9 Add a basic implementation of a GPUDevice object, 10 which references a MTLDevice. Also add a WebGPULayer 11 that will ultimately be used to host WebGPU content. 12 13 WebKit API Test: WebCore/mac/GPUDevice.mm 14 15 * Configurations/WebCore.xcconfig: Link to Metal. 16 17 * PlatformMac.cmake: New files. 18 * WebCore.xcodeproj/project.pbxproj: 19 20 * platform/Logging.h: Add a WebGPU logging channel. 21 22 * platform/graphics/cocoa/GPUDeviceMetal.mm: Added. 23 (WebCore::GPUDevice::GPUDevice): Cocoa implementation. 24 (WebCore::GPUDevice::reshape): 25 * platform/graphics/cocoa/WebGPULayer.h: Added. 26 * platform/graphics/cocoa/WebGPULayer.mm: Added. 27 (-[WebGPULayer initWithGPUDevice:]): 28 (-[WebGPULayer copyImageSnapshotWithColorSpace:]): 29 (-[WebGPULayer display]): 30 * platform/graphics/gpu/GPUDevice.cpp: Added. 31 (WebCore::GPUDevice::create): 32 (WebCore::GPUDevice::~GPUDevice): 33 (WebCore::GPUDevice::GPUDevice): Implementation for platforms 34 other than Mac and iOS hardware. 35 (WebCore::GPUDevice::reshape): 36 * platform/graphics/gpu/GPUDevice.h: Added. 37 (WebCore::GPUDevice::platformLayer): 38 (WebCore::GPUDevice::platformDevice): 39 (WebCore::GPUDevice::layer): 40 1 41 2017-03-07 Antoine Quint <graouts@apple.com> 2 42 -
trunk/Source/WebCore/Configurations/WebCore.xcconfig
r213483 r213541 79 79 80 80 OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_PLATFORM) 81 OTHER_LDFLAGS_BASE = -lsqlite3 -lobjc -lANGLE ;81 OTHER_LDFLAGS_BASE = -lsqlite3 -lobjc -lANGLE -framework Metal; 82 82 OTHER_LDFLAGS_BASE_ios = $(OTHER_LDFLAGS_BASE) -framework CFNetwork -framework CoreGraphics -framework CoreText -framework Foundation -framework ImageIO -framework MobileCoreServices -framework OpenGLES -lMobileGestalt $(WK_IOS_BINCOMPAT_LDFLAGS); 83 83 OTHER_LDFLAGS_PLATFORM[sdk=iphoneos*] = $(OTHER_LDFLAGS_BASE_ios) -framework IOSurface -framework GraphicsServices $(LIBWEBRTC_LDFLAGS); -
trunk/Source/WebCore/PlatformMac.cmake
r213489 r213541 108 108 "${WEBCORE_DIR}/platform/graphics/cg" 109 109 "${WEBCORE_DIR}/platform/graphics/cv" 110 "${WEBCORE_DIR}/platform/graphics/gpu" 110 111 "${WEBCORE_DIR}/platform/graphics/egl" 111 112 "${WEBCORE_DIR}/platform/graphics/opentype" … … 415 416 platform/graphics/cg/TransformationMatrixCG.cpp 416 417 418 platform/graphics/cocoa/GPUDeviceMetal.mm 417 419 platform/graphics/cocoa/FontCacheCoreText.cpp 418 420 platform/graphics/cocoa/FontCascadeCocoa.mm … … 427 429 platform/graphics/cv/TextureCacheCV.mm 428 430 platform/graphics/cv/VideoTextureCopierCV.cpp 431 432 platform/graphics/gpu/GPUDevice.cpp 429 433 430 434 platform/graphics/mac/ColorMac.mm -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r213489 r213541 1353 1353 314BE3A61B3103FB00141982 /* NamedImageGeneratedImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 314BE3A41B3103FB00141982 /* NamedImageGeneratedImage.cpp */; }; 1354 1354 314BE3A71B3103FB00141982 /* NamedImageGeneratedImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 314BE3A51B3103FB00141982 /* NamedImageGeneratedImage.h */; }; 1355 316BDB861E6E0A2700DE0D5A /* GPUDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = 316BDB851E6E0A2100DE0D5A /* GPUDevice.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1356 316BDB871E6E0A2C00DE0D5A /* GPUDevice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316BDB841E6E0A2100DE0D5A /* GPUDevice.cpp */; }; 1357 316BDB8B1E6E153000DE0D5A /* WebGPULayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 316BDB891E6E153000DE0D5A /* WebGPULayer.mm */; }; 1358 316BDB8C1E6E153000DE0D5A /* WebGPULayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 316BDB8A1E6E153000DE0D5A /* WebGPULayer.h */; }; 1359 316BDB8D1E6E189800DE0D5A /* GPUDeviceMetal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 316BDB881E6E141C00DE0D5A /* GPUDeviceMetal.mm */; }; 1355 1360 316FE0710E6CCBEE00BF6088 /* JSCSSKeyframeRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316FE06D0E6CCBEE00BF6088 /* JSCSSKeyframeRule.cpp */; }; 1356 1361 316FE0720E6CCBEE00BF6088 /* JSCSSKeyframeRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 316FE06E0E6CCBEE00BF6088 /* JSCSSKeyframeRule.h */; }; … … 8665 8670 314BE3A41B3103FB00141982 /* NamedImageGeneratedImage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NamedImageGeneratedImage.cpp; sourceTree = "<group>"; }; 8666 8671 314BE3A51B3103FB00141982 /* NamedImageGeneratedImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NamedImageGeneratedImage.h; sourceTree = "<group>"; }; 8672 316BDB841E6E0A2100DE0D5A /* GPUDevice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GPUDevice.cpp; sourceTree = "<group>"; }; 8673 316BDB851E6E0A2100DE0D5A /* GPUDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GPUDevice.h; sourceTree = "<group>"; }; 8674 316BDB881E6E141C00DE0D5A /* GPUDeviceMetal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GPUDeviceMetal.mm; sourceTree = "<group>"; }; 8675 316BDB891E6E153000DE0D5A /* WebGPULayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebGPULayer.mm; sourceTree = "<group>"; }; 8676 316BDB8A1E6E153000DE0D5A /* WebGPULayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGPULayer.h; sourceTree = "<group>"; }; 8667 8677 316FE06D0E6CCBEE00BF6088 /* JSCSSKeyframeRule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSKeyframeRule.cpp; sourceTree = "<group>"; }; 8668 8678 316FE06E0E6CCBEE00BF6088 /* JSCSSKeyframeRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCSSKeyframeRule.h; sourceTree = "<group>"; }; … … 17437 17447 isa = PBXGroup; 17438 17448 children = ( 17449 316BDB841E6E0A2100DE0D5A /* GPUDevice.cpp */, 17450 316BDB851E6E0A2100DE0D5A /* GPUDevice.h */, 17439 17451 498770D71242C535002226BA /* Texture.cpp */, 17440 17452 498770D81242C535002226BA /* Texture.h */, … … 22528 22540 7C4EDD731A7B607800198C4D /* FontCocoa.mm */, 22529 22541 B5320D6A122A24E9002D1440 /* FontPlatformDataCocoa.mm */, 22542 316BDB881E6E141C00DE0D5A /* GPUDeviceMetal.mm */, 22530 22543 2D0B4AA918DA1CCD00434DE1 /* IOSurface.h */, 22531 22544 2D0B4AAA18DA1CCD00434DE1 /* IOSurface.mm */, … … 22537 22550 2D3EF4461917915C00034184 /* WebCoreCALayerExtras.h */, 22538 22551 2D3EF4471917915C00034184 /* WebCoreCALayerExtras.mm */, 22552 316BDB891E6E153000DE0D5A /* WebGPULayer.mm */, 22553 316BDB8A1E6E153000DE0D5A /* WebGPULayer.h */, 22539 22554 ); 22540 22555 path = cocoa; … … 27196 27211 B2FA3D730AB75A6F000E5AC4 /* JSSVGFEDiffuseLightingElement.h in Headers */, 27197 27212 B2FA3D750AB75A6F000E5AC4 /* JSSVGFEDisplacementMapElement.h in Headers */, 27213 316BDB8C1E6E153000DE0D5A /* WebGPULayer.h in Headers */, 27198 27214 B2FA3D770AB75A6F000E5AC4 /* JSSVGFEDistantLightElement.h in Headers */, 27199 27215 4358E87D1360A2EE00E4748C /* JSSVGFEDropShadowElement.h in Headers */, … … 27548 27564 D3AA10F4123A98AA0092152B /* MediaQueryMatcher.h in Headers */, 27549 27565 9493B6C11D74B4120088E780 /* MediaQueryParser.h in Headers */, 27566 316BDB861E6E0A2700DE0D5A /* GPUDevice.h in Headers */, 27550 27567 C90843D01B18E47D00B68564 /* MediaRemoteControls.h in Headers */, 27551 27568 CD8ACA8F1D23971900ECC59E /* MediaRemoteSoftLink.h in Headers */, … … 29922 29939 97BC6A201505F081001B74AC /* Database.cpp in Sources */, 29923 29940 97BC6A231505F081001B74AC /* DatabaseAuthorizer.cpp in Sources */, 29941 316BDB8B1E6E153000DE0D5A /* WebGPULayer.mm in Sources */, 29924 29942 97BC6A271505F081001B74AC /* DatabaseContext.cpp in Sources */, 29925 29943 FE456F181677D74E005EDDF9 /* DatabaseManager.cpp in Sources */, … … 30503 30521 71B1E1261640491A00B1880A /* InspectorLayerTreeAgent.cpp in Sources */, 30504 30522 A5071E801C506B66009951BE /* InspectorMemoryAgent.cpp in Sources */, 30523 316BDB8D1E6E189800DE0D5A /* GPUDeviceMetal.mm in Sources */, 30505 30524 82AB1775125C826700C5069D /* InspectorNetworkAgent.cpp in Sources */, 30506 30525 504AACCD1834455900E3D9BC /* InspectorNodeFinder.cpp in Sources */, … … 31462 31481 CD641EBF1819B36000EE4C41 /* MediaTimeAVFoundation.cpp in Sources */, 31463 31482 CD60C0C6193E87C7003C656B /* MediaTimeQTKit.mm in Sources */, 31483 316BDB871E6E0A2C00DE0D5A /* GPUDevice.cpp in Sources */, 31464 31484 932CC0F71DFFDA1F004C0F9F /* MediaTrackConstraints.cpp in Sources */, 31465 31485 99C7CCB518C6B8990032E413 /* MemoizedDOMResult.cpp in Sources */, -
trunk/Source/WebCore/platform/Logging.h
r213167 r213541 88 88 M(WebAudio) \ 89 89 M(WebGL) \ 90 M(WebGPU) \ 90 91 M(WebRTC) \ 91 92 M(WebReplay) \ -
trunk/Tools/ChangeLog
r213533 r213541 1 2017-03-07 Dean Jackson <dino@apple.com> 2 3 Add GPUDevice implementation and WebGPULayer 4 https://bugs.webkit.org/show_bug.cgi?id=169219 5 <rdar://problem/30879048> 6 7 Reviewed by Sam Weinig. 8 9 Test for WebCore's GPUDevice class. 10 11 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 12 * TestWebKitAPI/Tests/WebCore/mac/GPUDevice.mm: Added. 13 (TestWebKitAPI::TEST): 14 1 15 2017-03-07 Alex Christensen <achristensen@webkit.org> 2 16 -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r213319 r213541 94 94 2EFF06D71D8AF34A0004BB30 /* WKWebViewCandidateTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2EFF06D61D8AF34A0004BB30 /* WKWebViewCandidateTests.mm */; }; 95 95 315118101DB1AE4000176304 /* ExtendedColor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3151180F1DB1ADD500176304 /* ExtendedColor.cpp */; }; 96 3162AE9C1E6F2FF5000E4DBC /* GPUDevice.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3162AE9B1E6F2FCE000E4DBC /* GPUDevice.mm */; }; 96 97 33BE5AF9137B5AAE00705813 /* MouseMoveAfterCrash_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33BE5AF8137B5AAE00705813 /* MouseMoveAfterCrash_Bundle.cpp */; }; 97 98 33DC8912141955FE00747EF7 /* simple-iframe.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 33DC890E1419539300747EF7 /* simple-iframe.html */; }; … … 947 948 2EFF06D61D8AF34A0004BB30 /* WKWebViewCandidateTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebViewCandidateTests.mm; sourceTree = "<group>"; }; 948 949 3151180F1DB1ADD500176304 /* ExtendedColor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExtendedColor.cpp; sourceTree = "<group>"; }; 950 3162AE9B1E6F2FCE000E4DBC /* GPUDevice.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GPUDevice.mm; sourceTree = "<group>"; }; 949 951 333B9CE11277F23100FEFCE3 /* PreventEmptyUserAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PreventEmptyUserAgent.cpp; sourceTree = "<group>"; }; 950 952 33BE5AF4137B5A6C00705813 /* MouseMoveAfterCrash.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MouseMoveAfterCrash.cpp; sourceTree = "<group>"; }; … … 1661 1663 sourceTree = "<group>"; 1662 1664 }; 1665 3162AE9A1E6F2F8F000E4DBC /* mac */ = { 1666 isa = PBXGroup; 1667 children = ( 1668 3162AE9B1E6F2FCE000E4DBC /* GPUDevice.mm */, 1669 ); 1670 path = mac; 1671 sourceTree = "<group>"; 1672 }; 1663 1673 440A1D3614A01000008A66F2 /* WebCore */ = { 1664 1674 isa = PBXGroup; 1665 1675 children = ( 1666 8E4A85361E1D1AA100F53B0F /* GridPosition.cpp */, 1676 7A909A6F1D877475007E10F8 /* AffineTransform.cpp */, 1677 93A720E518F1A0E800A848E1 /* CalculationValue.cpp */, 1678 07C046C91E42573E007201E7 /* CARingBuffer.cpp */, 1667 1679 CD89D0371C4EDB1300040A04 /* cocoa */, 1668 7A909A6F1D877475007E10F8 /* AffineTransform.cpp */,1669 07C046C91E42573E007201E7 /* CARingBuffer.cpp */,1670 7A909A701D877475007E10F8 /* FloatPoint.cpp */,1671 7A909A711D877475007E10F8 /* FloatRect.cpp */,1672 7A909A721D877475007E10F8 /* FloatSize.cpp */,1673 7A909A731D877475007E10F8 /* IntPoint.cpp */,1674 7A909A741D877475007E10F8 /* IntRect.cpp */,1675 7A909A751D877475007E10F8 /* IntSize.cpp */,1676 93A720E518F1A0E800A848E1 /* CalculationValue.cpp */,1677 1680 7C3965051CDD74F90094DBB8 /* Color.cpp */, 1681 1C9EB8401E380DA1005C6442 /* ComplexTextController.cpp */, 1678 1682 7CB184C41AA3F2100066EDFD /* ContentExtensions.cpp */, 1679 1683 CD5451E919E41F9D0016936F /* CSSParser.cpp */, … … 1683 1687 3151180F1DB1ADD500176304 /* ExtendedColor.cpp */, 1684 1688 41973B5A1AF2286A006C7B36 /* FileSystem.cpp */, 1689 7A909A701D877475007E10F8 /* FloatPoint.cpp */, 1690 7A909A711D877475007E10F8 /* FloatRect.cpp */, 1691 7A909A721D877475007E10F8 /* FloatSize.cpp */, 1692 1CAD1F851E5CE7DA00AF2C2C /* FontCache.cpp */, 1693 8E4A85361E1D1AA100F53B0F /* GridPosition.cpp */, 1685 1694 83B88A331C80056D00BB2418 /* HTMLParserIdioms.cpp */, 1695 7A909A731D877475007E10F8 /* IntPoint.cpp */, 1696 7A909A741D877475007E10F8 /* IntRect.cpp */, 1697 7A909A751D877475007E10F8 /* IntSize.cpp */, 1686 1698 14464012167A8305000BD218 /* LayoutUnit.cpp */, 1699 3162AE9A1E6F2F8F000E4DBC /* mac */, 1687 1700 CD225C071C45A69200140761 /* ParsedContentRange.cpp */, 1688 1701 CDCFA7A91E45122F00C2433D /* SampleMap.cpp */, … … 1697 1710 5C6E65411D5CEF8500F7862E /* URLParser.cpp */, 1698 1711 9C64DC311D76198A004B598E /* YouTubePluginReplacement.cpp */, 1699 1C9EB8401E380DA1005C6442 /* ComplexTextController.cpp */,1700 1CAD1F851E5CE7DA00AF2C2C /* FontCache.cpp */,1701 1712 ); 1702 1713 path = WebCore; … … 2769 2780 7CCE7F071A411AE600447C4C /* PageLoadBasic.cpp in Sources */, 2770 2781 7CCE7F081A411AE600447C4C /* PageLoadDidChangeLocationWithinPageForFrame.cpp in Sources */, 2782 3162AE9C1E6F2FF5000E4DBC /* GPUDevice.mm in Sources */, 2771 2783 7CCE7EC71A411A7E00447C4C /* PageVisibilityStateWithWindowChanges.mm in Sources */, 2772 2784 7CCE7F091A411AE600447C4C /* ParentFrame.cpp in Sources */,
Note: See TracChangeset
for help on using the changeset viewer.