WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
188114
Remove WebGPUObject
https://bugs.webkit.org/show_bug.cgi?id=188114
Summary
Remove WebGPUObject
Sam Weinig
Reported
2018-07-27 12:30:20 PDT
Remove WebGPUObject
Attachments
Patch
(68.15 KB, patch)
2018-07-27 20:02 PDT
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews200 for win-future
(13.02 MB, application/zip)
2018-07-28 11:01 PDT
,
EWS Watchlist
no flags
Details
Patch
(68.20 KB, patch)
2018-07-28 13:39 PDT
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(78.56 KB, patch)
2018-07-29 13:28 PDT
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(79.37 KB, patch)
2018-07-29 13:49 PDT
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(79.38 KB, patch)
2018-07-29 13:51 PDT
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(79.29 KB, patch)
2018-07-29 14:04 PDT
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(79.35 KB, patch)
2018-07-29 14:12 PDT
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(79.37 KB, patch)
2018-07-29 14:15 PDT
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews205 for win-future
(13.13 MB, application/zip)
2018-07-30 00:31 PDT
,
EWS Watchlist
no flags
Details
Patch
(79.58 KB, patch)
2018-07-30 11:17 PDT
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(79.01 KB, patch)
2018-08-03 15:45 PDT
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Show Obsolete
(11)
View All
Add attachment
proposed patch, testcase, etc.
Sam Weinig
Comment 1
2018-07-27 20:02:54 PDT
Comment hidden (obsolete)
Created
attachment 345986
[details]
Patch
EWS Watchlist
Comment 2
2018-07-27 20:04:24 PDT
Comment hidden (obsolete)
Attachment 345986
[details]
did not pass style-queue: ERROR: Source/WebCore/html/canvas/WebGPUDrawable.cpp:44: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 1 in 56 files If any of these errors are false positives, please file a bug against check-webkit-style.
EWS Watchlist
Comment 3
2018-07-28 11:01:21 PDT
Comment hidden (obsolete)
Comment on
attachment 345986
[details]
Patch
Attachment 345986
[details]
did not pass win-ews (win): Output:
https://webkit-queues.webkit.org/results/8683999
New failing tests: http/tests/security/video-poster-cross-origin-crash2.html
EWS Watchlist
Comment 4
2018-07-28 11:01:32 PDT
Comment hidden (obsolete)
Created
attachment 345994
[details]
Archive of layout-test-results from ews200 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews200 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Darin Adler
Comment 5
2018-07-28 13:37:24 PDT
Comment on
attachment 345986
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=345986&action=review
Great direction. I think we should reduce the use of WebGPURenderingContext even more. In fact, I think a better pattern might be to have the create functions take the GPUXXX&& arguments. The need for the rendering context argument drove a pattern where more of the logic was in the create functions, but I see no reason that callers, for example, couldn’t just create a GPUTexture and make a WebGPUTexture out of it. It would be nice if these WebGPU objects were closer to being pure wrappers.
> Source/WebCore/html/canvas/WebGPUBuffer.h:40 > static RefPtr<WebGPUBuffer> create(WebGPURenderingContext&, const JSC::ArrayBufferView&);
Consider changing the first argument from a WebGPURenderingContext& to a const GPUDevice&.
> Source/WebCore/html/canvas/WebGPUCommandBuffer.h:59 > + WebGPUCommandBuffer(const GPUCommandQueue&);
Should add explicit.
> Source/WebCore/html/canvas/WebGPUCommandQueue.h:42 > static Ref<WebGPUCommandQueue> create(WebGPURenderingContext&);
Consider changing the argument from a WebGPURenderingContext& to a const GPUDevice&.
> Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.h:50 > + WebGPUComputeCommandEncoder(const GPUCommandBuffer&);
Should add explicit.
> Source/WebCore/html/canvas/WebGPUComputePipelineState.h:41 > static Ref<WebGPUComputePipelineState> create(WebGPURenderingContext&, const GPUFunction&);
Consider changing the first argument from a WebGPURenderingContext& to a const GPUDevice&.
> Source/WebCore/html/canvas/WebGPUDepthStencilState.h:40 > static Ref<WebGPUDepthStencilState> create(WebGPURenderingContext&, const GPUDepthStencilDescriptor&);
Consider changing the first argument from a WebGPURenderingContext& to a const GPUDevice&.
> Source/WebCore/html/canvas/WebGPUDrawable.h:42 > static Ref<WebGPUDrawable> create(WebGPURenderingContext&);
Consider changing the argument from a WebGPURenderingContext& to a const GPUDevice&.
> Source/WebCore/html/canvas/WebGPUFunction.h:44 > + WebGPUFunction(GPUFunction&&);
Should add explicit.
> Source/WebCore/html/canvas/WebGPULibrary.h:42 > static Ref<WebGPULibrary> create(WebGPURenderingContext&, const String& sourceCode);
Consider changing the first argument from a WebGPURenderingContext& to a const GPUDevice&.
> Source/WebCore/html/canvas/WebGPURenderPassAttachmentDescriptor.h:56 > + explicit WebGPURenderPassAttachmentDescriptor();
Should remove explicit now that this has no arguments.
> Source/WebCore/html/canvas/WebGPURenderPassColorAttachmentDescriptor.h:44 > + WebGPURenderPassColorAttachmentDescriptor(GPURenderPassColorAttachmentDescriptor&&);
Should add explicit.
> Source/WebCore/html/canvas/WebGPURenderPassDepthAttachmentDescriptor.h:44 > + WebGPURenderPassDepthAttachmentDescriptor(GPURenderPassDepthAttachmentDescriptor&&);
Should add explicit.
> Source/WebCore/html/canvas/WebGPURenderPipelineState.h:40 > static Ref<WebGPURenderPipelineState> create(WebGPURenderingContext&, const GPURenderPipelineDescriptor&);
Consider changing the first argument from a WebGPURenderingContext& to a const GPUDevice&.
> Source/WebCore/html/canvas/WebGPUTexture.h:41 > static Ref<WebGPUTexture> create(WebGPURenderingContext&, const GPUTextureDescriptor&);
Consider changing the first argument from a WebGPURenderingContext& to a const GPUDevice&. Or consider eliminating this and promoting createFromDrawableTexture to be named create. The caller can create the GPUTexture.
Sam Weinig
Comment 6
2018-07-28 13:39:08 PDT
Comment hidden (obsolete)
Created
attachment 345999
[details]
Patch
Darin Adler
Comment 7
2018-07-28 13:40:34 PDT
Comment on
attachment 345999
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=345999&action=review
> Source/WebCore/html/canvas/WebGPURenderPassColorAttachmentDescriptor.cpp:43 > + : WebGPURenderPassAttachmentDescriptor()
I don’t think explicit base class initialization is needed any more in this constructor.
> Source/WebCore/html/canvas/WebGPURenderPassDepthAttachmentDescriptor.cpp:41 > + : WebGPURenderPassAttachmentDescriptor()
Ditto.
EWS Watchlist
Comment 8
2018-07-28 13:41:05 PDT
Comment hidden (obsolete)
Attachment 345999
[details]
did not pass style-queue: ERROR: Source/WebCore/html/canvas/WebGPUDrawable.cpp:44: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 1 in 56 files If any of these errors are false positives, please file a bug against check-webkit-style.
Sam Weinig
Comment 9
2018-07-29 13:28:59 PDT
Comment hidden (obsolete)
Created
attachment 346036
[details]
Patch
EWS Watchlist
Comment 10
2018-07-29 13:30:15 PDT
Comment hidden (obsolete)
Attachment 346036
[details]
did not pass style-queue: ERROR: Source/WebCore/html/canvas/WebGPULibrary.cpp:42: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUDrawable.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 2 in 57 files If any of these errors are false positives, please file a bug against check-webkit-style.
Sam Weinig
Comment 11
2018-07-29 13:49:14 PDT
Comment hidden (obsolete)
Created
attachment 346038
[details]
Patch
Sam Weinig
Comment 12
2018-07-29 13:51:08 PDT
Comment hidden (obsolete)
Created
attachment 346039
[details]
Patch
EWS Watchlist
Comment 13
2018-07-29 13:54:11 PDT
Comment hidden (obsolete)
Attachment 346039
[details]
did not pass style-queue: ERROR: Source/WebCore/html/canvas/WebGPULibrary.cpp:42: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUDrawable.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 2 in 59 files If any of these errors are false positives, please file a bug against check-webkit-style.
Sam Weinig
Comment 14
2018-07-29 13:56:29 PDT
(In reply to Darin Adler from
comment #5
)
> Comment on
attachment 345986
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=345986&action=review
> > Great direction. > > I think we should reduce the use of WebGPURenderingContext even more. In > fact, I think a better pattern might be to have the create functions take > the GPUXXX&& arguments. The need for the rendering context argument drove a > pattern where more of the logic was in the create functions, but I see no > reason that callers, for example, couldn’t just create a GPUTexture and make > a WebGPUTexture out of it. It would be nice if these WebGPU objects were > closer to being pure wrappers.
Yeah, that does sound better. Updated the patch to do that.
> > > Source/WebCore/html/canvas/WebGPUBuffer.h:40 > > static RefPtr<WebGPUBuffer> create(WebGPURenderingContext&, const JSC::ArrayBufferView&); > > Consider changing the first argument from a WebGPURenderingContext& to a > const GPUDevice&.
Changed to take a GPUBuffer&& instead.
> > > Source/WebCore/html/canvas/WebGPUCommandBuffer.h:59 > > + WebGPUCommandBuffer(const GPUCommandQueue&); > > Should add explicit.
Done.
> > > Source/WebCore/html/canvas/WebGPUCommandQueue.h:42 > > static Ref<WebGPUCommandQueue> create(WebGPURenderingContext&); > > Consider changing the argument from a WebGPURenderingContext& to a const > GPUDevice&.
Changed to take a GPUCommandQueue&& instead.
> > > Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.h:50 > > + WebGPUComputeCommandEncoder(const GPUCommandBuffer&); > > Should add explicit.
Done.
> > > Source/WebCore/html/canvas/WebGPUComputePipelineState.h:41 > > static Ref<WebGPUComputePipelineState> create(WebGPURenderingContext&, const GPUFunction&); > > Consider changing the first argument from a WebGPURenderingContext& to a > const GPUDevice&.
Changed to take a GPUComputePipelineState&& instead.
> > > Source/WebCore/html/canvas/WebGPUDepthStencilState.h:40 > > static Ref<WebGPUDepthStencilState> create(WebGPURenderingContext&, const GPUDepthStencilDescriptor&); > > Consider changing the first argument from a WebGPURenderingContext& to a > const GPUDevice&.
Changed to take a GPUDepthStencilState&& instead.
> > > Source/WebCore/html/canvas/WebGPUDrawable.h:42 > > static Ref<WebGPUDrawable> create(WebGPURenderingContext&); > > Consider changing the argument from a WebGPURenderingContext& to a const > GPUDevice&.
Changed to take a GPUDrawable.h&& instead.
> > > Source/WebCore/html/canvas/WebGPUFunction.h:44 > > + WebGPUFunction(GPUFunction&&); > > Should add explicit.
Done.
> > > Source/WebCore/html/canvas/WebGPULibrary.h:42 > > static Ref<WebGPULibrary> create(WebGPURenderingContext&, const String& sourceCode); > > Consider changing the first argument from a WebGPURenderingContext& to a > const GPUDevice&.
Changed to take a GPULibrary&& instead.
> > > Source/WebCore/html/canvas/WebGPURenderPassAttachmentDescriptor.h:56 > > + explicit WebGPURenderPassAttachmentDescriptor(); > > Should remove explicit now that this has no arguments.
Done.
> > > Source/WebCore/html/canvas/WebGPURenderPassColorAttachmentDescriptor.h:44 > > + WebGPURenderPassColorAttachmentDescriptor(GPURenderPassColorAttachmentDescriptor&&); > > Should add explicit.
Done.
> > > Source/WebCore/html/canvas/WebGPURenderPassDepthAttachmentDescriptor.h:44 > > + WebGPURenderPassDepthAttachmentDescriptor(GPURenderPassDepthAttachmentDescriptor&&); > > Should add explicit.
Done.
> > > Source/WebCore/html/canvas/WebGPURenderPipelineState.h:40 > > static Ref<WebGPURenderPipelineState> create(WebGPURenderingContext&, const GPURenderPipelineDescriptor&); > > Consider changing the first argument from a WebGPURenderingContext& to a > const GPUDevice&.
Changed to take a GPURenderPipelineState&& instead.
> > > Source/WebCore/html/canvas/WebGPUTexture.h:41 > > static Ref<WebGPUTexture> create(WebGPURenderingContext&, const GPUTextureDescriptor&); > > Consider changing the first argument from a WebGPURenderingContext& to a > const GPUDevice&. > > Or consider eliminating this and promoting createFromDrawableTexture to be > named create. The caller can create the GPUTexture.
I did that latter.
Sam Weinig
Comment 15
2018-07-29 13:57:04 PDT
(In reply to Darin Adler from
comment #7
)
> Comment on
attachment 345999
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=345999&action=review
> > > Source/WebCore/html/canvas/WebGPURenderPassColorAttachmentDescriptor.cpp:43 > > + : WebGPURenderPassAttachmentDescriptor() > > I don’t think explicit base class initialization is needed any more in this > constructor. > > > Source/WebCore/html/canvas/WebGPURenderPassDepthAttachmentDescriptor.cpp:41 > > + : WebGPURenderPassAttachmentDescriptor() > > Ditto.
Removed the base class initialization in both cases.
Sam Weinig
Comment 16
2018-07-29 14:04:30 PDT
Comment hidden (obsolete)
Created
attachment 346040
[details]
Patch
EWS Watchlist
Comment 17
2018-07-29 14:05:55 PDT
Comment hidden (obsolete)
Attachment 346040
[details]
did not pass style-queue: ERROR: Source/WebCore/html/canvas/WebGPULibrary.cpp:42: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUDrawable.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 2 in 59 files If any of these errors are false positives, please file a bug against check-webkit-style.
Sam Weinig
Comment 18
2018-07-29 14:12:33 PDT
Comment hidden (obsolete)
Created
attachment 346041
[details]
Patch
EWS Watchlist
Comment 19
2018-07-29 14:15:41 PDT
Comment hidden (obsolete)
Attachment 346041
[details]
did not pass style-queue: ERROR: Source/WebCore/html/canvas/WebGPULibrary.cpp:42: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUDrawable.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 2 in 59 files If any of these errors are false positives, please file a bug against check-webkit-style.
Sam Weinig
Comment 20
2018-07-29 14:15:55 PDT
Comment hidden (obsolete)
Created
attachment 346042
[details]
Patch
EWS Watchlist
Comment 21
2018-07-29 14:18:53 PDT
Comment hidden (obsolete)
Attachment 346042
[details]
did not pass style-queue: ERROR: Source/WebCore/html/canvas/WebGPULibrary.cpp:42: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUDrawable.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 2 in 59 files If any of these errors are false positives, please file a bug against check-webkit-style.
Darin Adler
Comment 22
2018-07-29 14:43:55 PDT
Comment on
attachment 346042
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=346042&action=review
> Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.h:32 > +#include <wtf/Ref.h>
RefPtr.h happens to include Ref.h, so we never have to include both. Not sure that’s an elegant thing, but I tend to go with it and leave out the Ref.h include when both are needed.
EWS Watchlist
Comment 23
2018-07-30 00:31:35 PDT
Comment hidden (obsolete)
Comment on
attachment 346042
[details]
Patch
Attachment 346042
[details]
did not pass win-ews (win): Output:
https://webkit-queues.webkit.org/results/8696590
New failing tests: http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-video.html imported/blink/transitions/unprefixed-transform.html legacy-animation-engine/imported/blink/transitions/unprefixed-transform.html
EWS Watchlist
Comment 24
2018-07-30 00:31:47 PDT
Comment hidden (obsolete)
Created
attachment 346052
[details]
Archive of layout-test-results from ews205 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews205 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Sam Weinig
Comment 25
2018-07-30 11:17:08 PDT
Created
attachment 346073
[details]
Patch
EWS Watchlist
Comment 26
2018-07-30 11:19:34 PDT
Attachment 346073
[details]
did not pass style-queue: ERROR: Source/WebCore/html/canvas/WebGPULibrary.cpp:42: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUDrawable.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 2 in 59 files If any of these errors are false positives, please file a bug against check-webkit-style.
Sam Weinig
Comment 27
2018-08-03 15:45:30 PDT
Created
attachment 346554
[details]
Patch
EWS Watchlist
Comment 28
2018-08-03 15:48:07 PDT
Attachment 346554
[details]
did not pass style-queue: ERROR: Source/WebCore/html/canvas/WebGPULibrary.cpp:42: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/html/canvas/WebGPUDrawable.cpp:43: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 2 in 59 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 29
2018-08-03 16:26:04 PDT
Comment on
attachment 346554
[details]
Patch Clearing flags on attachment: 346554 Committed
r234564
: <
https://trac.webkit.org/changeset/234564
>
WebKit Commit Bot
Comment 30
2018-08-03 16:26:06 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 31
2018-08-03 17:17:53 PDT
<
rdar://problem/42920504
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug