Bug 169219

Summary: Add GPUDevice implementation and WebGPULayer
Product: WebKit Reporter: Dean Jackson <dino>
Component: WebGLAssignee: Dean Jackson <dino>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dino, graouts, kondapallykalyan, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 167952    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch sam: review+

Description Dean Jackson 2017-03-06 14:28:43 PST
Foundation of the WebGPU implementation.
Comment 1 Radar WebKit Bug Importer 2017-03-06 14:28:56 PST
<rdar://problem/30879048>
Comment 2 Dean Jackson 2017-03-06 14:32:05 PST
Created attachment 303559 [details]
Patch
Comment 3 Dean Jackson 2017-03-06 14:32:34 PST
Not for review - just EWS. Writing API tests.
Comment 4 Dean Jackson 2017-03-07 04:09:06 PST
Created attachment 303640 [details]
Patch
Comment 5 Dean Jackson 2017-03-07 04:38:07 PST
Created attachment 303644 [details]
Patch
Comment 6 Dean Jackson 2017-03-07 13:01:45 PST
Created attachment 303706 [details]
Patch
Comment 7 Sam Weinig 2017-03-07 13:26:07 PST
Comment on attachment 303706 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=303706&action=review

> Source/WebCore/platform/graphics/cocoa/GPUDeviceMetal.mm:55
> +#ifndef NDEBUG
> +    [m_layer setName:@"WebGPU Layer"];
> +#endif

Do we really need to make these debug only still?

> Source/WebCore/platform/graphics/cocoa/WebGPULayer.h:33
> +#import <Metal/Metal.h>
> +#import <QuartzCore/QuartzCore.h>
> +
> +namespace WebCore {
> +class GPUDevice;
> +}

This file is not guarded by #if ENABLE(WEBGPU). Should it be?

> Source/WebCore/platform/graphics/cocoa/WebGPULayer.mm:35
> +
> +#import "GPUDevice.h"
> +#import "GraphicsContextCG.h"
> +#import "GraphicsLayer.h"
> +#import <wtf/FastMalloc.h>
> +#import <wtf/RetainPtr.h>
> +
> +using namespace WebCore;

This file is not guarded by #if ENABLE(WEBGPU). Should it be?

> Source/WebCore/platform/graphics/gpu/GPUDevice.cpp:32
> +#import "Logging.h"
> +
> +#if ENABLE(WEBGPU)
> +

When guarded like this, we usually put all the #includes/#imports below the main one, inside the guard.

> Tools/TestWebKitAPI/Tests/WebCore/mac/GPUDevice.mm:33
> +#include "config.h"
> +#import "Test.h"
> +#import <Metal/Metal.h>
> +#import <WebCore/GPUDevice.h>
> +
> +using namespace WebCore;
> +
> +namespace TestWebKitAPI {

This file is not guarded by #if ENABLE(WEBGPU). Should it be?
Comment 8 Dean Jackson 2017-03-07 14:28:34 PST
Committed r213541: <http://trac.webkit.org/changeset/213541>