WebGPU: build fixes for non-Cocoa platforms
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Mar 2017 14:11:24 +0000 (14:11 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Mar 2017 14:11:24 +0000 (14:11 +0000)
commit85abf799d797a737eb094dccc2bcd1cb2097c1f4
treebff897cc35dc7b0c8242f1258c2d8e0a3c38c6cd
parent51df710d4f8c55429fca3ad1cc683e10482e266a
WebGPU: build fixes for non-Cocoa platforms
https://bugs.webkit.org/show_bug.cgi?id=169781

Reviewed by Alex Christensen.

Enable building WebGPU code for other ports and fix various build
failures. This still leaves the GPUDevice::platformLayer() method
missing for other ports, as well as the general implementation of
the WebGPU platform abstractions under platform/graphics/gpu/.

* CMakeLists.txt: Move the WebGPU build targets here.
* PlatformMac.cmake:
* html/canvas/WebGPULibrary.h: Explicitly include the WTFString.h
header to suppress missing WTF::String definition errors.
* platform/graphics/gpu/GPUBuffer.cpp:
(WebCore::GPUBuffer::contents): Avoid ambiguous calls to
ArrayBuffer::create() by passing nullptr as the first argument.
* platform/graphics/gpu/GPUDevice.h: Include the Forward.h header
to forward-declare the WTF::String class. Also remove the unused
PlatformGPUDevice typedef for non-Cocoa platforms.
(WebCore::GPUDevice::layer): Move this and the related m_layer
member variable under the PLATFORM(COCOA) guard.
* platform/graphics/gpu/GPUFunction.cpp:
(WebCore::GPUFunction::GPUFunction): Remove the GPULibrary
parameter checks in this no-op constructor that's used on
non-Cocoa platforms.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/PlatformMac.cmake
Source/WebCore/html/canvas/WebGPULibrary.h
Source/WebCore/platform/graphics/gpu/GPUBuffer.cpp
Source/WebCore/platform/graphics/gpu/GPUDevice.h
Source/WebCore/platform/graphics/gpu/GPUFunction.cpp