WebKit Bugzilla
Attachment 345986 Details for
Bug 188114
: Remove WebGPUObject
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188114-20180727200253.patch (text/plain), 68.15 KB, created by
Sam Weinig
on 2018-07-27 20:02:54 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Sam Weinig
Created:
2018-07-27 20:02:54 PDT
Size:
68.15 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 234342) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,234 @@ >+2018-07-27 Sam Weinig <sam@webkit.org> >+ >+ Remove WebGPUObject >+ https://bugs.webkit.org/show_bug.cgi?id=188114 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This removes the unecessary WebGPUObject base class and updates the classes >+ that were inheriting from it to instead inherit directly from RefCounted. This >+ shrinks the size of all the classes that were inheriting from it, as they no >+ longer store a RefPtr<WebGPURenderingContext> member, which was unneeded. Most >+ of the classes also shrink because they can be devirtualized. >+ >+ As some of the classes constructors still need a WebGPURenderingContext (or >+ more accurately, usually need the GPUDevice it holds), this continues to pass >+ WebGPURenderingContext were necessary. >+ >+ * Sources.txt: >+ * WebCore.xcodeproj/project.pbxproj: >+ Remove WebGPUObject.h/cpp >+ >+ * html/canvas/WebGPUBuffer.cpp: >+ (WebCore::WebGPUBuffer::WebGPUBuffer): >+ * html/canvas/WebGPUBuffer.h: >+ * html/canvas/WebGPUBuffer.idl: >+ Switch from inheriting from WebGPUObject to directly inheriting from >+ RefCounted<WebGPUBuffer>. Since this de-virtualizes it, also add >+ ImplementationLacksVTable to the IDL file. >+ >+ * html/canvas/WebGPUCommandBuffer.cpp: >+ (WebCore::WebGPUCommandBuffer::create): >+ (WebCore::WebGPUCommandBuffer::WebGPUCommandBuffer): >+ Update create and constructor to no longer require a context, as it would >+ now be unused, as it no longer inherits from WebGPUObject nor needs to hold >+ onto the context for any reason. >+ >+ (WebCore::WebGPUCommandBuffer::createRenderCommandEncoderWithDescriptor): >+ Update to call the new WebGPURenderCommandEncoder::create, which no longer >+ requires a context. >+ >+ (WebCore::WebGPUCommandBuffer::createComputeCommandEncoder): >+ Update to call the new WebGPUComputeCommandEncoder::create, which no longer >+ requires a context. >+ >+ * html/canvas/WebGPUCommandBuffer.h: >+ * html/canvas/WebGPUCommandBuffer.idl: >+ Switch from inheriting from GPUObject to directly inheriting from >+ RefCounted<WebGPUCommandBuffer>. Since this de-virtualizes it, also add >+ ImplementationLacksVTable to the IDL file. Also update create and constructor >+ to no longer take a context. >+ >+ * html/canvas/WebGPUCommandQueue.cpp: >+ (WebCore::WebGPUCommandQueue::WebGPUCommandQueue): >+ (WebCore::WebGPUCommandQueue::createCommandBuffer): >+ Update to call the new WebGPUCommandBuffer::create, which no longer >+ requires a context. >+ >+ * html/canvas/WebGPUCommandQueue.h: >+ * html/canvas/WebGPUCommandQueue.idl: >+ Switch from inheriting from GPUObject to directly inheriting from >+ RefCounted<WebGPUCommandQueue>. Since this de-virtualizes it, also add >+ ImplementationLacksVTable to the IDL file >+ >+ * html/canvas/WebGPUComputeCommandEncoder.cpp: >+ (WebCore::WebGPUComputeCommandEncoder::create): >+ (WebCore::WebGPUComputeCommandEncoder::WebGPUComputeCommandEncoder): >+ * html/canvas/WebGPUComputeCommandEncoder.h: >+ * html/canvas/WebGPUComputeCommandEncoder.idl: >+ Switch from inheriting from GPUObject to directly inheriting from >+ RefCounted<WebGPUComputeCommandEncoder>. Since this de-virtualizes it, >+ also add ImplementationLacksVTable to the IDL file. Also update create >+ and constructor to no longer take a context. >+ >+ * html/canvas/WebGPUComputePipelineState.cpp: >+ (WebCore::WebGPUComputePipelineState::WebGPUComputePipelineState): >+ * html/canvas/WebGPUComputePipelineState.h: >+ * html/canvas/WebGPUComputePipelineState.idl: >+ Switch from inheriting from WebGPUObject to directly inheriting from >+ RefCounted<WebGPUComputePipelineState>. Since this de-virtualizes it, also add >+ ImplementationLacksVTable to the IDL file. >+ >+ * html/canvas/WebGPUDepthStencilDescriptor.cpp: >+ Remove unneeded include of include "WebGPURenderingContext.h". >+ >+ * html/canvas/WebGPUDepthStencilDescriptor.h: >+ * html/canvas/WebGPUDepthStencilDescriptor.idl: >+ Switch from inheriting from WebGPUObject to directly inheriting from >+ RefCounted<WebGPUDepthStencilDescriptor>. Since this de-virtualizes it, also add >+ ImplementationLacksVTable to the IDL file. >+ >+ * html/canvas/WebGPUDepthStencilState.cpp: >+ (WebCore::WebGPUDepthStencilState::WebGPUDepthStencilState): >+ * html/canvas/WebGPUDepthStencilState.h: >+ * html/canvas/WebGPUDepthStencilState.idl: >+ Switch from inheriting from WebGPUObject to directly inheriting from >+ RefCounted<WebGPUDepthStencilState>. Since this de-virtualizes it, also add >+ ImplementationLacksVTable to the IDL file. >+ >+ * html/canvas/WebGPUDrawable.cpp: >+ (WebCore::WebGPUDrawable::WebGPUDrawable): >+ * html/canvas/WebGPUDrawable.h: >+ * html/canvas/WebGPUDrawable.idl: >+ Switch from inheriting from WebGPUObject to directly inheriting from >+ RefCounted<WebGPUDrawable>. Since this de-virtualizes it, also add >+ ImplementationLacksVTable to the IDL file >+ >+ * html/canvas/WebGPUFunction.cpp: >+ (WebCore::WebGPUFunction::create): >+ (WebCore::WebGPUFunction::WebGPUFunction): >+ * html/canvas/WebGPUFunction.h: >+ * html/canvas/WebGPUFunction.idl: >+ Switch from inheriting from GPUObject to directly inheriting from >+ RefCounted<WebGPUFunction>. Since this de-virtualizes it, also add >+ ImplementationLacksVTable to the IDL file. Also update create and >+ constructor to no longer take a context, as it is now not used. >+ >+ * html/canvas/WebGPULibrary.cpp: >+ (WebCore::WebGPULibrary::WebGPULibrary): >+ (WebCore::WebGPULibrary::functionWithName const): >+ Update for new WebGPUFunction::create, which no longer requires a >+ context. >+ >+ * html/canvas/WebGPULibrary.h: >+ * html/canvas/WebGPULibrary.idl: >+ Switch from inheriting from WebGPUObject to directly inheriting from >+ RefCounted<WebGPULibrary>. Since this de-virtualizes it, also add >+ ImplementationLacksVTable to the IDL file. >+ >+ * html/canvas/WebGPUObject.cpp: Removed. >+ * html/canvas/WebGPUObject.h: Removed. >+ Deleted. >+ >+ * html/canvas/WebGPURenderCommandEncoder.cpp: >+ (WebCore::WebGPURenderCommandEncoder::create): >+ (WebCore::WebGPURenderCommandEncoder::WebGPURenderCommandEncoder): >+ * html/canvas/WebGPURenderCommandEncoder.h: >+ * html/canvas/WebGPURenderCommandEncoder.idl: >+ Switch from inheriting from GPUObject to directly inheriting from >+ RefCounted<WebGPURenderCommandEncoder>. Since this de-virtualizes it, also add >+ ImplementationLacksVTable to the IDL file. Also update create and constructor to >+ no longer take a context, as it is now not used. >+ >+ * html/canvas/WebGPURenderPassAttachmentDescriptor.cpp: >+ (WebCore::WebGPURenderPassAttachmentDescriptor::WebGPURenderPassAttachmentDescriptor): >+ * html/canvas/WebGPURenderPassAttachmentDescriptor.h: >+ Switch from inheriting from GPUObject to directly inheriting from >+ RefCounted<WebGPURenderPassAttachmentDescriptor>. Also update create and >+ constructor to no longer take a context, as it is now not used. This remains virtual >+ as it is inherited from by WebGPURenderPassColorAttachmentDescriptor and WebGPURenderPassDepthAttachmentDescriptor. >+ >+ * html/canvas/WebGPURenderPassColorAttachmentDescriptor.cpp: >+ (WebCore::WebGPURenderPassColorAttachmentDescriptor::create): >+ (WebCore::WebGPURenderPassColorAttachmentDescriptor::WebGPURenderPassColorAttachmentDescriptor): >+ * html/canvas/WebGPURenderPassColorAttachmentDescriptor.h: >+ Update create and constructor to no longer take a context, as it is now not used. Declare final >+ as this is no inherited by anything. >+ >+ * html/canvas/WebGPURenderPassDepthAttachmentDescriptor.cpp: >+ (WebCore::WebGPURenderPassDepthAttachmentDescriptor::create): >+ (WebCore::WebGPURenderPassDepthAttachmentDescriptor::WebGPURenderPassDepthAttachmentDescriptor): >+ * html/canvas/WebGPURenderPassDepthAttachmentDescriptor.h: >+ Update create and constructor to no longer take a context, as it is now not used. Declare final >+ as this is no inherited by anything. >+ >+ * html/canvas/WebGPURenderPassDescriptor.cpp: >+ (WebCore::WebGPURenderPassDescriptor::depthAttachment): >+ Update for new WebGPURenderPassDepthAttachmentDescriptor::create function which no longer requires >+ a context. >+ >+ Semi-interesting note: This function was previously calling "*context()" to pass a WebGPURenderingContext& >+ to WebGPURenderPassDepthAttachmentDescriptor::create. However, "context()" was always returning null, as >+ the constructor of WebGPURenderPassDescriptor was not initializing the WebGPUObject with a WebGPURenderingContext. >+ Now, one might think that this would cause a null-deref, but, because it was being assigned into a >+ WebGPURenderingContext&, no dereference happens right away (it essentially just passes a pointer) and since >+ the function it is being passed to does not use it, it never actually gets dereferenced. >+ >+ (WebCore::WebGPURenderPassDescriptor::colorAttachments): >+ Update for new WebGPURenderPassColorAttachmentDescriptor::create function which no longer requires >+ a context. >+ >+ * html/canvas/WebGPURenderPassDescriptor.h: >+ * html/canvas/WebGPURenderPassDescriptor.idl: >+ Switch from inheriting from GPUObject to directly inheriting from >+ RefCounted<WebGPURenderPassDescriptor>. Since this de-virtualizes it, also add >+ ImplementationLacksVTable to the IDL file. >+ >+ * html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.cpp: >+ (WebCore::WebGPURenderPipelineColorAttachmentDescriptor::create): >+ (WebCore::WebGPURenderPipelineColorAttachmentDescriptor::WebGPURenderPipelineColorAttachmentDescriptor): >+ * html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.h: >+ * html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.idl: >+ Switch from inheriting from GPUObject to directly inheriting from >+ RefCounted<WebGPURenderPipelineColorAttachmentDescriptor>. Since this de-virtualizes it, also add >+ ImplementationLacksVTable to the IDL file. Also update create and constructor to >+ no longer take a context, as it is now not used. >+ >+ * html/canvas/WebGPURenderPipelineDescriptor.cpp: >+ (WebCore::WebGPURenderPipelineDescriptor::colorAttachments): >+ Update for new WebGPURenderPipelineColorAttachmentDescriptor::create which no longer requires >+ a context. >+ >+ * html/canvas/WebGPURenderPipelineDescriptor.h: >+ * html/canvas/WebGPURenderPipelineDescriptor.idl: >+ Switch from inheriting from GPUObject to directly inheriting from >+ RefCounted<WebGPURenderPipelineDescriptor>. Since this de-virtualizes it, also add >+ ImplementationLacksVTable to the IDL file. >+ >+ * html/canvas/WebGPURenderPipelineState.cpp: >+ (WebCore::WebGPURenderPipelineState::WebGPURenderPipelineState): >+ * html/canvas/WebGPURenderPipelineState.h: >+ * html/canvas/WebGPURenderPipelineState.idl: >+ Switch from inheriting from GPUObject to directly inheriting from >+ RefCounted<WebGPURenderPipelineState>. Since this de-virtualizes it, also add >+ ImplementationLacksVTable to the IDL file. >+ >+ * html/canvas/WebGPUTexture.cpp: >+ (WebCore::WebGPUTexture::createFromDrawableTexture): >+ (WebCore::WebGPUTexture::WebGPUTexture): >+ * html/canvas/WebGPUTexture.h: >+ * html/canvas/WebGPUTexture.idl: >+ Switch from inheriting from GPUObject to directly inheriting from >+ RefCounted<WebGPUTexture>. Since this de-virtualizes it, also add >+ ImplementationLacksVTable to the IDL file. Also update createFromDrawableTexture >+ and constructor to no longer take a context, as it is now not used. >+ >+ * html/canvas/WebGPUTextureDescriptor.h: >+ * html/canvas/WebGPUTextureDescriptor.idl: >+ Switch from inheriting from GPUObject to directly inheriting from >+ RefCounted<WebGPUTextureDescriptor>. Since this de-virtualizes it, also add >+ ImplementationLacksVTable to the IDL file. >+ > 2018-07-27 Simon Fraser <simon.fraser@apple.com> > > Adjust the color matrix for the inverse apple-invert-lightness() transformation >Index: Source/WebCore/Sources.txt >=================================================================== >--- Source/WebCore/Sources.txt (revision 234342) >+++ Source/WebCore/Sources.txt (working copy) >@@ -1113,7 +1113,6 @@ html/canvas/WebGPUDrawable.cpp > html/canvas/WebGPUEnums.cpp > html/canvas/WebGPUFunction.cpp > html/canvas/WebGPULibrary.cpp >-html/canvas/WebGPUObject.cpp > html/canvas/WebGPURenderCommandEncoder.cpp > html/canvas/WebGPURenderPassAttachmentDescriptor.cpp > html/canvas/WebGPURenderPassColorAttachmentDescriptor.cpp >Index: Source/WebCore/WebCore.xcodeproj/project.pbxproj >=================================================================== >--- Source/WebCore/WebCore.xcodeproj/project.pbxproj (revision 234342) >+++ Source/WebCore/WebCore.xcodeproj/project.pbxproj (working copy) >@@ -6940,8 +6940,6 @@ > 31A088DE1E737B4D003B6609 /* WebGPULibrary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebGPULibrary.cpp; sourceTree = "<group>"; }; > 31A088DF1E737B4D003B6609 /* WebGPULibrary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGPULibrary.h; sourceTree = "<group>"; }; > 31A088E01E737B4D003B6609 /* WebGPULibrary.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebGPULibrary.idl; sourceTree = "<group>"; }; >- 31A088E11E737B4D003B6609 /* WebGPUObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebGPUObject.cpp; sourceTree = "<group>"; }; >- 31A088E21E737B4D003B6609 /* WebGPUObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGPUObject.h; sourceTree = "<group>"; }; > 31A088E31E737B4D003B6609 /* WebGPURenderCommandEncoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebGPURenderCommandEncoder.cpp; sourceTree = "<group>"; }; > 31A088E41E737B4D003B6609 /* WebGPURenderCommandEncoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGPURenderCommandEncoder.h; sourceTree = "<group>"; }; > 31A088E51E737B4D003B6609 /* WebGPURenderCommandEncoder.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebGPURenderCommandEncoder.idl; sourceTree = "<group>"; }; >@@ -17467,8 +17465,6 @@ > 31A088DE1E737B4D003B6609 /* WebGPULibrary.cpp */, > 31A088DF1E737B4D003B6609 /* WebGPULibrary.h */, > 31A088E01E737B4D003B6609 /* WebGPULibrary.idl */, >- 31A088E11E737B4D003B6609 /* WebGPUObject.cpp */, >- 31A088E21E737B4D003B6609 /* WebGPUObject.h */, > 31A088E31E737B4D003B6609 /* WebGPURenderCommandEncoder.cpp */, > 31A088E41E737B4D003B6609 /* WebGPURenderCommandEncoder.h */, > 31A088E51E737B4D003B6609 /* WebGPURenderCommandEncoder.idl */, >@@ -29894,8 +29890,6 @@ > 3C244FEAA375AC633F88BE6F /* RenderLayerModelObject.h in Headers */, > 0BE030A20F3112FB003C1A46 /* RenderLineBoxList.h in Headers */, > BCEA4864097D93020094C9E4 /* RenderLineBreak.h in Headers */, >- 94CFD60A1FE9867E002488AD /* RenderLinesClampFlow.h in Headers */, >- 94CFD60D1FEACEFE002488AD /* RenderLinesClampSet.h in Headers */, > ABB5419F0ACDDFE4002820EB /* RenderListBox.h in Headers */, > A8EA7A520A191A5200A8EF5F /* RenderListItem.h in Headers */, > A8EA7A500A191A5200A8EF5F /* RenderListMarker.h in Headers */, >Index: Source/WebCore/html/canvas/WebGPUBuffer.cpp >=================================================================== >--- Source/WebCore/html/canvas/WebGPUBuffer.cpp (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUBuffer.cpp (working copy) >@@ -39,8 +39,7 @@ RefPtr<WebGPUBuffer> WebGPUBuffer::creat > } > > WebGPUBuffer::WebGPUBuffer(WebGPURenderingContext& context, const JSC::ArrayBufferView& data) >- : WebGPUObject { &context } >- , m_buffer { context.device(), data } >+ : m_buffer { context.device(), data } > { > } > >Index: Source/WebCore/html/canvas/WebGPUBuffer.h >=================================================================== >--- Source/WebCore/html/canvas/WebGPUBuffer.h (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUBuffer.h (working copy) >@@ -28,11 +28,14 @@ > #if ENABLE(WEBGPU) > > #include "GPUBuffer.h" >-#include "WebGPUObject.h" >+#include <wtf/RefCounted.h> >+#include <wtf/RefPtr.h> > > namespace WebCore { > >-class WebGPUBuffer : public WebGPUObject { >+class WebGPURenderingContext; >+ >+class WebGPUBuffer : public RefCounted<WebGPUBuffer> { > public: > static RefPtr<WebGPUBuffer> create(WebGPURenderingContext&, const JSC::ArrayBufferView&); > >Index: Source/WebCore/html/canvas/WebGPUBuffer.idl >=================================================================== >--- Source/WebCore/html/canvas/WebGPUBuffer.idl (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUBuffer.idl (working copy) >@@ -25,7 +25,8 @@ > > [ > Conditional=WEBGPU, >- EnabledAtRuntime=WebGPU >+ EnabledAtRuntime=WebGPU, >+ ImplementationLacksVTable > ] interface WebGPUBuffer { > > readonly attribute unsigned long length; >Index: Source/WebCore/html/canvas/WebGPUCommandBuffer.cpp >=================================================================== >--- Source/WebCore/html/canvas/WebGPUCommandBuffer.cpp (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUCommandBuffer.cpp (working copy) >@@ -36,18 +36,16 @@ > #include "WebGPUDrawable.h" > #include "WebGPURenderCommandEncoder.h" > #include "WebGPURenderPassDescriptor.h" >-#include "WebGPURenderingContext.h" > > namespace WebCore { > >-Ref<WebGPUCommandBuffer> WebGPUCommandBuffer::create(WebGPURenderingContext& context, const GPUCommandQueue& queue) >+Ref<WebGPUCommandBuffer> WebGPUCommandBuffer::create(const GPUCommandQueue& queue) > { >- return adoptRef(*new WebGPUCommandBuffer(context, queue)); >+ return adoptRef(*new WebGPUCommandBuffer(queue)); > } > >-WebGPUCommandBuffer::WebGPUCommandBuffer(WebGPURenderingContext& context, const GPUCommandQueue& queue) >- : WebGPUObject { &context } >- , m_buffer { queue, [this] () { m_completed.resolve(); } } >+WebGPUCommandBuffer::WebGPUCommandBuffer(const GPUCommandQueue& queue) >+ : m_buffer { queue, [this] () { m_completed.resolve(); } } > { > LOG(WebGPU, "WebGPUCommandBuffer::WebGPUCommandBuffer()"); > } >@@ -71,12 +69,12 @@ void WebGPUCommandBuffer::presentDrawabl > > Ref<WebGPURenderCommandEncoder> WebGPUCommandBuffer::createRenderCommandEncoderWithDescriptor(WebGPURenderPassDescriptor& descriptor) > { >- return WebGPURenderCommandEncoder::create(*context(), m_buffer, descriptor.descriptor()); >+ return WebGPURenderCommandEncoder::create(m_buffer, descriptor.descriptor()); > } > > Ref<WebGPUComputeCommandEncoder> WebGPUCommandBuffer::createComputeCommandEncoder() > { >- return WebGPUComputeCommandEncoder::create(*context(), m_buffer); >+ return WebGPUComputeCommandEncoder::create(m_buffer); > } > > DOMPromiseProxy<IDLVoid>& WebGPUCommandBuffer::completed() >Index: Source/WebCore/html/canvas/WebGPUCommandBuffer.h >=================================================================== >--- Source/WebCore/html/canvas/WebGPUCommandBuffer.h (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUCommandBuffer.h (working copy) >@@ -30,7 +30,8 @@ > > #include "DOMPromiseProxy.h" > #include "GPUCommandBuffer.h" >-#include "WebGPUObject.h" >+#include <wtf/Ref.h> >+#include <wtf/RefCounted.h> > > namespace WebCore { > >@@ -39,10 +40,10 @@ class WebGPUDrawable; > class WebGPURenderCommandEncoder; > class WebGPURenderPassDescriptor; > >-class WebGPUCommandBuffer : public WebGPUObject { >+class WebGPUCommandBuffer : public RefCounted<WebGPUCommandBuffer> { > public: >- virtual ~WebGPUCommandBuffer(); >- static Ref<WebGPUCommandBuffer> create(WebGPURenderingContext&, const GPUCommandQueue&); >+ ~WebGPUCommandBuffer(); >+ static Ref<WebGPUCommandBuffer> create(const GPUCommandQueue&); > > void commit(); > void presentDrawable(WebGPUDrawable&); >@@ -55,7 +56,7 @@ public: > const GPUCommandBuffer& buffer() const { return m_buffer; } > > private: >- WebGPUCommandBuffer(WebGPURenderingContext&, const GPUCommandQueue&); >+ WebGPUCommandBuffer(const GPUCommandQueue&); > > GPUCommandBuffer m_buffer; > DOMPromiseProxy<IDLVoid> m_completed; >Index: Source/WebCore/html/canvas/WebGPUCommandBuffer.idl >=================================================================== >--- Source/WebCore/html/canvas/WebGPUCommandBuffer.idl (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUCommandBuffer.idl (working copy) >@@ -26,12 +26,12 @@ > > [ > Conditional=WEBGPU, >- EnabledAtRuntime=WebGPU >+ EnabledAtRuntime=WebGPU, >+ ImplementationLacksVTable > ] interface WebGPUCommandBuffer { > WebGPURenderCommandEncoder createRenderCommandEncoderWithDescriptor(WebGPURenderPassDescriptor descriptor); > WebGPUComputeCommandEncoder createComputeCommandEncoder(); > void commit(); > void presentDrawable(WebGPUDrawable drawable); > readonly attribute Promise<void> completed; >- > }; >Index: Source/WebCore/html/canvas/WebGPUCommandQueue.cpp >=================================================================== >--- Source/WebCore/html/canvas/WebGPUCommandQueue.cpp (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUCommandQueue.cpp (working copy) >@@ -39,8 +39,7 @@ Ref<WebGPUCommandQueue> WebGPUCommandQue > } > > WebGPUCommandQueue::WebGPUCommandQueue(WebGPURenderingContext& context) >- : WebGPUObject { &context } >- , m_queue { context.device() } >+ : m_queue { context.device() } > { > } > >@@ -48,7 +47,7 @@ WebGPUCommandQueue::~WebGPUCommandQueue( > > Ref<WebGPUCommandBuffer> WebGPUCommandQueue::createCommandBuffer() > { >- return WebGPUCommandBuffer::create(*context(), m_queue); >+ return WebGPUCommandBuffer::create(m_queue); > } > > } // namespace WebCore >Index: Source/WebCore/html/canvas/WebGPUCommandQueue.h >=================================================================== >--- Source/WebCore/html/canvas/WebGPUCommandQueue.h (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUCommandQueue.h (working copy) >@@ -28,15 +28,17 @@ > #if ENABLE(WEBGPU) > > #include "GPUCommandQueue.h" >-#include "WebGPUObject.h" >+#include <wtf/Ref.h> >+#include <wtf/RefCounted.h> > > namespace WebCore { > > class WebGPUCommandBuffer; >+class WebGPURenderingContext; > >-class WebGPUCommandQueue : public WebGPUObject { >+class WebGPUCommandQueue : public RefCounted<WebGPUCommandQueue> { > public: >- virtual ~WebGPUCommandQueue(); >+ ~WebGPUCommandQueue(); > static Ref<WebGPUCommandQueue> create(WebGPURenderingContext&); > > String label() const { return m_queue.label(); } >Index: Source/WebCore/html/canvas/WebGPUCommandQueue.idl >=================================================================== >--- Source/WebCore/html/canvas/WebGPUCommandQueue.idl (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUCommandQueue.idl (working copy) >@@ -25,7 +25,8 @@ > > [ > Conditional=WEBGPU, >- EnabledAtRuntime=WebGPU >+ EnabledAtRuntime=WebGPU, >+ ImplementationLacksVTable > ] interface WebGPUCommandQueue { > > attribute DOMString label; >Index: Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.cpp >=================================================================== >--- Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.cpp (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.cpp (working copy) >@@ -34,7 +34,6 @@ > #include "WebGPUBuffer.h" > #include "WebGPUCommandBuffer.h" > #include "WebGPUComputePipelineState.h" >-#include "WebGPURenderingContext.h" > > namespace WebCore { > >@@ -43,14 +42,13 @@ static inline GPUSize GPUSizeMake(WebGPU > return { size.width, size.height, size.depth }; > } > >-Ref<WebGPUComputeCommandEncoder> WebGPUComputeCommandEncoder::create(WebGPURenderingContext& context, const GPUCommandBuffer& buffer) >+Ref<WebGPUComputeCommandEncoder> WebGPUComputeCommandEncoder::create(const GPUCommandBuffer& buffer) > { >- return adoptRef(*new WebGPUComputeCommandEncoder(context, buffer)); >+ return adoptRef(*new WebGPUComputeCommandEncoder(buffer)); > } > >-WebGPUComputeCommandEncoder::WebGPUComputeCommandEncoder(WebGPURenderingContext& context, const GPUCommandBuffer& buffer) >- : WebGPUObject { &context } >- , m_encoder { buffer } >+WebGPUComputeCommandEncoder::WebGPUComputeCommandEncoder(const GPUCommandBuffer& buffer) >+ : m_encoder { buffer } > { > } > >Index: Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.h >=================================================================== >--- Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.h (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.h (working copy) >@@ -28,17 +28,18 @@ > #if ENABLE(WEBGPU) > > #include "GPUComputeCommandEncoder.h" >-#include "WebGPUObject.h" > #include "WebGPUSize.h" >+#include <wtf/Ref.h> >+#include <wtf/RefCounted.h> > > namespace WebCore { > > class WebGPUBuffer; > class WebGPUComputePipelineState; > >-class WebGPUComputeCommandEncoder : public WebGPUObject { >+class WebGPUComputeCommandEncoder : public RefCounted<WebGPUComputeCommandEncoder> { > public: >- static Ref<WebGPUComputeCommandEncoder> create(WebGPURenderingContext&, const GPUCommandBuffer&); >+ static Ref<WebGPUComputeCommandEncoder> create(const GPUCommandBuffer&); > > void setComputePipelineState(WebGPUComputePipelineState&); > void setBuffer(WebGPUBuffer&, unsigned, unsigned); >@@ -46,7 +47,7 @@ public: > void endEncoding(); > > private: >- WebGPUComputeCommandEncoder(WebGPURenderingContext&, const GPUCommandBuffer&); >+ WebGPUComputeCommandEncoder(const GPUCommandBuffer&); > > GPUComputeCommandEncoder m_encoder; > }; >Index: Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.idl >=================================================================== >--- Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.idl (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUComputeCommandEncoder.idl (working copy) >@@ -25,7 +25,8 @@ > > [ > Conditional=WEBGPU, >- EnabledAtRuntime=WebGPU >+ EnabledAtRuntime=WebGPU, >+ ImplementationLacksVTable > ] interface WebGPUComputeCommandEncoder { > > void setComputePipelineState(WebGPUComputePipelineState pipelineState); >Index: Source/WebCore/html/canvas/WebGPUComputePipelineState.cpp >=================================================================== >--- Source/WebCore/html/canvas/WebGPUComputePipelineState.cpp (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUComputePipelineState.cpp (working copy) >@@ -36,8 +36,7 @@ Ref<WebGPUComputePipelineState> WebGPUCo > } > > WebGPUComputePipelineState::WebGPUComputePipelineState(WebGPURenderingContext& context, const GPUFunction& function) >- : WebGPUObject { &context } >- , m_state { context.device(), function } >+ : m_state { context.device(), function } > { > } > >Index: Source/WebCore/html/canvas/WebGPUComputePipelineState.h >=================================================================== >--- Source/WebCore/html/canvas/WebGPUComputePipelineState.h (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUComputePipelineState.h (working copy) >@@ -28,13 +28,15 @@ > #if ENABLE(WEBGPU) > > #include "GPUComputePipelineState.h" >-#include "WebGPUObject.h" >+#include <wtf/Ref.h> >+#include <wtf/RefCounted.h> > > namespace WebCore { > > class WebGPUFunction; >+class WebGPURenderingContext; > >-class WebGPUComputePipelineState : public WebGPUObject { >+class WebGPUComputePipelineState : public RefCounted<WebGPUComputePipelineState> { > public: > static Ref<WebGPUComputePipelineState> create(WebGPURenderingContext&, const GPUFunction&); > >Index: Source/WebCore/html/canvas/WebGPUComputePipelineState.idl >=================================================================== >--- Source/WebCore/html/canvas/WebGPUComputePipelineState.idl (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUComputePipelineState.idl (working copy) >@@ -25,6 +25,7 @@ > > [ > Conditional=WEBGPU, >- EnabledAtRuntime=WebGPU >+ EnabledAtRuntime=WebGPU, >+ ImplementationLacksVTable > ] interface WebGPUComputePipelineState { > }; >Index: Source/WebCore/html/canvas/WebGPUDepthStencilDescriptor.cpp >=================================================================== >--- Source/WebCore/html/canvas/WebGPUDepthStencilDescriptor.cpp (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUDepthStencilDescriptor.cpp (working copy) >@@ -28,8 +28,6 @@ > > #if ENABLE(WEBGPU) > >-#include "WebGPURenderingContext.h" >- > namespace WebCore { > > Ref<WebGPUDepthStencilDescriptor> WebGPUDepthStencilDescriptor::create() >Index: Source/WebCore/html/canvas/WebGPUDepthStencilDescriptor.h >=================================================================== >--- Source/WebCore/html/canvas/WebGPUDepthStencilDescriptor.h (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUDepthStencilDescriptor.h (working copy) >@@ -29,11 +29,12 @@ > > #include "GPUDepthStencilDescriptor.h" > #include "WebGPUEnums.h" >-#include "WebGPUObject.h" >+#include <wtf/Ref.h> >+#include <wtf/RefCounted.h> > > namespace WebCore { > >-class WebGPUDepthStencilDescriptor : public WebGPUObject { >+class WebGPUDepthStencilDescriptor : public RefCounted<WebGPUDepthStencilDescriptor> { > public: > static Ref<WebGPUDepthStencilDescriptor> create(); > >Index: Source/WebCore/html/canvas/WebGPUDepthStencilDescriptor.idl >=================================================================== >--- Source/WebCore/html/canvas/WebGPUDepthStencilDescriptor.idl (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUDepthStencilDescriptor.idl (working copy) >@@ -40,7 +40,8 @@ > [ > Constructor, > Conditional=WEBGPU, >- EnabledAtRuntime=WebGPU >+ EnabledAtRuntime=WebGPU, >+ ImplementationLacksVTable > ] interface WebGPUDepthStencilDescriptor { > > attribute WebGPUCompareFunction depthCompareFunction; >Index: Source/WebCore/html/canvas/WebGPUDepthStencilState.cpp >=================================================================== >--- Source/WebCore/html/canvas/WebGPUDepthStencilState.cpp (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUDepthStencilState.cpp (working copy) >@@ -39,8 +39,7 @@ Ref<WebGPUDepthStencilState> WebGPUDepth > } > > WebGPUDepthStencilState::WebGPUDepthStencilState(WebGPURenderingContext& context, const GPUDepthStencilDescriptor& descriptor) >- : WebGPUObject { &context } >- , m_state { context.device(), descriptor } >+ : m_state { context.device(), descriptor } > { > } > >Index: Source/WebCore/html/canvas/WebGPUDepthStencilState.h >=================================================================== >--- Source/WebCore/html/canvas/WebGPUDepthStencilState.h (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUDepthStencilState.h (working copy) >@@ -28,11 +28,14 @@ > #if ENABLE(WEBGPU) > > #include "GPUDepthStencilState.h" >-#include "WebGPUObject.h" >+#include <wtf/Ref.h> >+#include <wtf/RefCounted.h> > > namespace WebCore { > >-class WebGPUDepthStencilState : public WebGPUObject { >+class WebGPURenderingContext; >+ >+class WebGPUDepthStencilState : public RefCounted<WebGPUDepthStencilState> { > public: > static Ref<WebGPUDepthStencilState> create(WebGPURenderingContext&, const GPUDepthStencilDescriptor&); > >Index: Source/WebCore/html/canvas/WebGPUDepthStencilState.idl >=================================================================== >--- Source/WebCore/html/canvas/WebGPUDepthStencilState.idl (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUDepthStencilState.idl (working copy) >@@ -25,7 +25,8 @@ > > [ > Conditional=WEBGPU, >- EnabledAtRuntime=WebGPU >+ EnabledAtRuntime=WebGPU, >+ ImplementationLacksVTable > ] interface WebGPUDepthStencilState { > > attribute DOMString label; >Index: Source/WebCore/html/canvas/WebGPUDrawable.cpp >=================================================================== >--- Source/WebCore/html/canvas/WebGPUDrawable.cpp (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUDrawable.cpp (working copy) >@@ -40,9 +40,8 @@ Ref<WebGPUDrawable> WebGPUDrawable::crea > } > > WebGPUDrawable::WebGPUDrawable(WebGPURenderingContext& context) >- : WebGPUObject { &context } >- , m_drawable { context.device() } >- , m_texture { WebGPUTexture::createFromDrawableTexture(context, GPUTexture { m_drawable }) } >+ : m_drawable { context.device() } >+ , m_texture { WebGPUTexture::createFromDrawableTexture(GPUTexture { m_drawable }) } > { > } > >Index: Source/WebCore/html/canvas/WebGPUDrawable.h >=================================================================== >--- Source/WebCore/html/canvas/WebGPUDrawable.h (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUDrawable.h (working copy) >@@ -28,15 +28,17 @@ > #if ENABLE(WEBGPU) > > #include "GPUDrawable.h" >-#include "WebGPUObject.h" >+#include <wtf/Ref.h> >+#include <wtf/RefCounted.h> > > namespace WebCore { > > class WebGPUTexture; >+class WebGPURenderingContext; > >-class WebGPUDrawable : public WebGPUObject { >+class WebGPUDrawable : public RefCounted<WebGPUDrawable> { > public: >- virtual ~WebGPUDrawable(); >+ ~WebGPUDrawable(); > static Ref<WebGPUDrawable> create(WebGPURenderingContext&); > > GPUDrawable& drawable() { return m_drawable; } >Index: Source/WebCore/html/canvas/WebGPUDrawable.idl >=================================================================== >--- Source/WebCore/html/canvas/WebGPUDrawable.idl (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUDrawable.idl (working copy) >@@ -25,7 +25,8 @@ > > [ > Conditional=WEBGPU, >- EnabledAtRuntime=WebGPU >+ EnabledAtRuntime=WebGPU, >+ ImplementationLacksVTable > ] interface WebGPUDrawable { > > readonly attribute WebGPUTexture texture; // FIXME: Only the framebuffer should have this. >Index: Source/WebCore/html/canvas/WebGPUFunction.cpp >=================================================================== >--- Source/WebCore/html/canvas/WebGPUFunction.cpp (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUFunction.cpp (working copy) >@@ -29,18 +29,16 @@ > #if ENABLE(WEBGPU) > > #include "WebGPULibrary.h" >-#include "WebGPURenderingContext.h" > > namespace WebCore { > >-Ref<WebGPUFunction> WebGPUFunction::create(WebGPURenderingContext& context, GPUFunction&& function) >+Ref<WebGPUFunction> WebGPUFunction::create(GPUFunction&& function) > { >- return adoptRef(*new WebGPUFunction(context, WTFMove(function))); >+ return adoptRef(*new WebGPUFunction(WTFMove(function))); > } > >-WebGPUFunction::WebGPUFunction(WebGPURenderingContext& context, GPUFunction&& function) >- : WebGPUObject { &context } >- , m_function { WTFMove(function) } >+WebGPUFunction::WebGPUFunction(GPUFunction&& function) >+ : m_function { WTFMove(function) } > { > } > >Index: Source/WebCore/html/canvas/WebGPUFunction.h >=================================================================== >--- Source/WebCore/html/canvas/WebGPUFunction.h (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUFunction.h (working copy) >@@ -28,19 +28,20 @@ > #if ENABLE(WEBGPU) > > #include "GPUFunction.h" >-#include "WebGPUObject.h" >+#include <wtf/Ref.h> >+#include <wtf/RefCounted.h> > > namespace WebCore { > >-class WebGPUFunction : public WebGPUObject { >+class WebGPUFunction : public RefCounted<WebGPUFunction> { > public: >- static Ref<WebGPUFunction> create(WebGPURenderingContext&, GPUFunction&&); >+ static Ref<WebGPUFunction> create(GPUFunction&&); > > String name() const { return m_function.name(); } > const GPUFunction& function() const { return m_function; } > > private: >- WebGPUFunction(WebGPURenderingContext&, GPUFunction&&); >+ WebGPUFunction(GPUFunction&&); > > GPUFunction m_function; > }; >Index: Source/WebCore/html/canvas/WebGPUFunction.idl >=================================================================== >--- Source/WebCore/html/canvas/WebGPUFunction.idl (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUFunction.idl (working copy) >@@ -25,7 +25,8 @@ > > [ > Conditional=WEBGPU, >- EnabledAtRuntime=WebGPU >+ EnabledAtRuntime=WebGPU, >+ ImplementationLacksVTable > ] interface WebGPUFunction { > > readonly attribute DOMString name; >Index: Source/WebCore/html/canvas/WebGPULibrary.cpp >=================================================================== >--- Source/WebCore/html/canvas/WebGPULibrary.cpp (revision 234342) >+++ Source/WebCore/html/canvas/WebGPULibrary.cpp (working copy) >@@ -39,8 +39,7 @@ Ref<WebGPULibrary> WebGPULibrary::create > } > > WebGPULibrary::WebGPULibrary(WebGPURenderingContext& context, const String& sourceCode) >- : WebGPUObject { &context } >- , m_sourceCode { sourceCode } >+ : m_sourceCode { sourceCode } > , m_library { context.device(), sourceCode } > { > } >@@ -55,7 +54,7 @@ RefPtr<WebGPUFunction> WebGPULibrary::fu > GPUFunction function { m_library, name }; > if (!function) > return nullptr; >- return WebGPUFunction::create(*context(), WTFMove(function)); >+ return WebGPUFunction::create(WTFMove(function)); > } > > } // namespace WebCore >Index: Source/WebCore/html/canvas/WebGPULibrary.h >=================================================================== >--- Source/WebCore/html/canvas/WebGPULibrary.h (revision 234342) >+++ Source/WebCore/html/canvas/WebGPULibrary.h (working copy) >@@ -28,13 +28,16 @@ > #if ENABLE(WEBGPU) > > #include "GPULibrary.h" >-#include "WebGPUObject.h" >+#include <wtf/Ref.h> >+#include <wtf/RefCounted.h> >+#include <wtf/RefPtr.h> > > namespace WebCore { > > class WebGPUFunction; >+class WebGPURenderingContext; > >-class WebGPULibrary : public WebGPUObject { >+class WebGPULibrary : public RefCounted<WebGPULibrary> { > public: > static Ref<WebGPULibrary> create(WebGPURenderingContext&, const String& sourceCode); > >Index: Source/WebCore/html/canvas/WebGPULibrary.idl >=================================================================== >--- Source/WebCore/html/canvas/WebGPULibrary.idl (revision 234342) >+++ Source/WebCore/html/canvas/WebGPULibrary.idl (working copy) >@@ -25,7 +25,8 @@ > > [ > Conditional=WEBGPU, >- EnabledAtRuntime=WebGPU >+ EnabledAtRuntime=WebGPU, >+ ImplementationLacksVTable > ] interface WebGPULibrary { > > readonly attribute DOMString sourceCode; >Index: Source/WebCore/html/canvas/WebGPUObject.cpp >=================================================================== >--- Source/WebCore/html/canvas/WebGPUObject.cpp (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUObject.cpp (nonexistent) >@@ -1,44 +0,0 @@ >-/* >- * Copyright (C) 2017 Apple Inc. All rights reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#include "config.h" >-#include "WebGPUObject.h" >- >-#if ENABLE(WEBGPU) >- >-#include "WebGPURenderingContext.h" >- >-namespace WebCore { >- >-WebGPUObject::WebGPUObject(WebGPURenderingContext* context) >- : m_context { context } >-{ >-} >- >-WebGPUObject::~WebGPUObject() = default; >- >-} >- >-#endif > >Property changes on: Source/WebCore/html/canvas/WebGPUObject.cpp >___________________________________________________________________ >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:keywords >## -1 +0,0 ## >-Date Author Id Revision HeadURL >\ No newline at end of property >Index: Source/WebCore/html/canvas/WebGPUObject.h >=================================================================== >--- Source/WebCore/html/canvas/WebGPUObject.h (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUObject.h (nonexistent) >@@ -1,54 +0,0 @@ >-/* >- * Copyright (C) 2017 Apple Inc. All rights reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#pragma once >- >-#if ENABLE(WEBGPU) >- >-#include <wtf/RefCounted.h> >-#include <wtf/RefPtr.h> >- >-namespace WebCore { >- >-class WebGPURenderingContext; >- >-class WebGPUObject : public RefCounted<WebGPUObject> { >-public: >- virtual ~WebGPUObject(); >- >- WebGPURenderingContext* context() const { return m_context.get(); } >- >-protected: >- explicit WebGPUObject(WebGPURenderingContext* = nullptr); >- >- bool hasContext() const { return m_context; } >- >-private: >- RefPtr<WebGPURenderingContext> m_context; >-}; >- >-} // namespace WebCore >- >-#endif > >Property changes on: Source/WebCore/html/canvas/WebGPUObject.h >___________________________________________________________________ >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:keywords >## -1 +0,0 ## >-Date Author Id Revision HeadURL >\ No newline at end of property >Index: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp >=================================================================== >--- Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp (revision 234342) >+++ Source/WebCore/html/canvas/WebGPURenderCommandEncoder.cpp (working copy) >@@ -35,18 +35,16 @@ > #include "WebGPUDepthStencilState.h" > #include "WebGPURenderPassDescriptor.h" > #include "WebGPURenderPipelineState.h" >-#include "WebGPURenderingContext.h" > > namespace WebCore { > >-Ref<WebGPURenderCommandEncoder> WebGPURenderCommandEncoder::create(WebGPURenderingContext& context, const GPUCommandBuffer& buffer, const GPURenderPassDescriptor& descriptor) >+Ref<WebGPURenderCommandEncoder> WebGPURenderCommandEncoder::create(const GPUCommandBuffer& buffer, const GPURenderPassDescriptor& descriptor) > { >- return adoptRef(*new WebGPURenderCommandEncoder(context, buffer, descriptor)); >+ return adoptRef(*new WebGPURenderCommandEncoder(buffer, descriptor)); > } > >-WebGPURenderCommandEncoder::WebGPURenderCommandEncoder(WebGPURenderingContext& context, const GPUCommandBuffer& buffer, const GPURenderPassDescriptor& descriptor) >- : WebGPUObject { &context } >- , m_encoder { buffer, descriptor } >+WebGPURenderCommandEncoder::WebGPURenderCommandEncoder(const GPUCommandBuffer& buffer, const GPURenderPassDescriptor& descriptor) >+ : m_encoder { buffer, descriptor } > { > } > >Index: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.h >=================================================================== >--- Source/WebCore/html/canvas/WebGPURenderCommandEncoder.h (revision 234342) >+++ Source/WebCore/html/canvas/WebGPURenderCommandEncoder.h (working copy) >@@ -28,18 +28,19 @@ > #if ENABLE(WEBGPU) > > #include "GPURenderCommandEncoder.h" >-#include "WebGPUObject.h" >+#include <wtf/Ref.h> >+#include <wtf/RefCounted.h> > > namespace WebCore { > >+class WebGPUBuffer; > class WebGPUDepthStencilState; > class WebGPURenderPipelineState; >-class WebGPUBuffer; > >-class WebGPURenderCommandEncoder : public WebGPUObject { >+class WebGPURenderCommandEncoder : public RefCounted<WebGPURenderCommandEncoder> { > public: >- virtual ~WebGPURenderCommandEncoder(); >- static Ref<WebGPURenderCommandEncoder> create(WebGPURenderingContext&, const GPUCommandBuffer&, const GPURenderPassDescriptor&); >+ ~WebGPURenderCommandEncoder(); >+ static Ref<WebGPURenderCommandEncoder> create(const GPUCommandBuffer&, const GPURenderPassDescriptor&); > > void setRenderPipelineState(WebGPURenderPipelineState&); > void setDepthStencilState(WebGPUDepthStencilState&); >@@ -51,7 +52,7 @@ public: > GPURenderCommandEncoder& encoder() { return m_encoder; } > > private: >- WebGPURenderCommandEncoder(WebGPURenderingContext&, const GPUCommandBuffer&, const GPURenderPassDescriptor&); >+ WebGPURenderCommandEncoder(const GPUCommandBuffer&, const GPURenderPassDescriptor&); > > GPURenderCommandEncoder m_encoder; > }; >Index: Source/WebCore/html/canvas/WebGPURenderCommandEncoder.idl >=================================================================== >--- Source/WebCore/html/canvas/WebGPURenderCommandEncoder.idl (revision 234342) >+++ Source/WebCore/html/canvas/WebGPURenderCommandEncoder.idl (working copy) >@@ -25,7 +25,8 @@ > > [ > Conditional=WEBGPU, >- EnabledAtRuntime=WebGPU >+ EnabledAtRuntime=WebGPU, >+ ImplementationLacksVTable > ] interface WebGPURenderCommandEncoder { > > void setRenderPipelineState(WebGPURenderPipelineState pipelineState); >Index: Source/WebCore/html/canvas/WebGPURenderPassAttachmentDescriptor.cpp >=================================================================== >--- Source/WebCore/html/canvas/WebGPURenderPassAttachmentDescriptor.cpp (revision 234342) >+++ Source/WebCore/html/canvas/WebGPURenderPassAttachmentDescriptor.cpp (working copy) >@@ -30,13 +30,11 @@ > > #include "GPURenderPassAttachmentDescriptor.h" > #include "GPUTexture.h" >-#include "WebGPURenderingContext.h" > #include "WebGPUTexture.h" > > namespace WebCore { > >-WebGPURenderPassAttachmentDescriptor::WebGPURenderPassAttachmentDescriptor(WebGPURenderingContext& context) >- : WebGPUObject { &context } >+WebGPURenderPassAttachmentDescriptor::WebGPURenderPassAttachmentDescriptor() > { > } > >Index: Source/WebCore/html/canvas/WebGPURenderPassAttachmentDescriptor.h >=================================================================== >--- Source/WebCore/html/canvas/WebGPURenderPassAttachmentDescriptor.h (revision 234342) >+++ Source/WebCore/html/canvas/WebGPURenderPassAttachmentDescriptor.h (working copy) >@@ -27,14 +27,17 @@ > > #if ENABLE(WEBGPU) > >-#include "WebGPUObject.h" >+#include <wtf/Ref.h> >+#include <wtf/RefCounted.h> >+#include <wtf/RefPtr.h> > > namespace WebCore { > > class GPURenderPassAttachmentDescriptor; >+class WebGPURenderingContext; > class WebGPUTexture; > >-class WebGPURenderPassAttachmentDescriptor : public WebGPUObject { >+class WebGPURenderPassAttachmentDescriptor : public RefCounted<WebGPURenderPassAttachmentDescriptor> { > public: > virtual ~WebGPURenderPassAttachmentDescriptor(); > >@@ -50,7 +53,7 @@ public: > virtual bool isColorAttachmentDescriptor() const = 0; > > protected: >- explicit WebGPURenderPassAttachmentDescriptor(WebGPURenderingContext&); >+ explicit WebGPURenderPassAttachmentDescriptor(); > > private: > virtual const GPURenderPassAttachmentDescriptor& descriptor() const = 0; >Index: Source/WebCore/html/canvas/WebGPURenderPassColorAttachmentDescriptor.cpp >=================================================================== >--- Source/WebCore/html/canvas/WebGPURenderPassColorAttachmentDescriptor.cpp (revision 234342) >+++ Source/WebCore/html/canvas/WebGPURenderPassColorAttachmentDescriptor.cpp (working copy) >@@ -29,18 +29,17 @@ > #if ENABLE(WEBGPU) > > #include "GPUTexture.h" >-#include "WebGPURenderingContext.h" > #include "WebGPUTexture.h" > > namespace WebCore { > >-Ref<WebGPURenderPassColorAttachmentDescriptor> WebGPURenderPassColorAttachmentDescriptor::create(WebGPURenderingContext& context, GPURenderPassColorAttachmentDescriptor&& descriptor) >+Ref<WebGPURenderPassColorAttachmentDescriptor> WebGPURenderPassColorAttachmentDescriptor::create(GPURenderPassColorAttachmentDescriptor&& descriptor) > { >- return adoptRef(*new WebGPURenderPassColorAttachmentDescriptor(context, WTFMove(descriptor))); >+ return adoptRef(*new WebGPURenderPassColorAttachmentDescriptor(WTFMove(descriptor))); > } > >-WebGPURenderPassColorAttachmentDescriptor::WebGPURenderPassColorAttachmentDescriptor(WebGPURenderingContext& context, GPURenderPassColorAttachmentDescriptor&& descriptor) >- : WebGPURenderPassAttachmentDescriptor(context) >+WebGPURenderPassColorAttachmentDescriptor::WebGPURenderPassColorAttachmentDescriptor(GPURenderPassColorAttachmentDescriptor&& descriptor) >+ : WebGPURenderPassAttachmentDescriptor() > , m_descriptor(WTFMove(descriptor)) > { > } >Index: Source/WebCore/html/canvas/WebGPURenderPassColorAttachmentDescriptor.h >=================================================================== >--- Source/WebCore/html/canvas/WebGPURenderPassColorAttachmentDescriptor.h (revision 234342) >+++ Source/WebCore/html/canvas/WebGPURenderPassColorAttachmentDescriptor.h (working copy) >@@ -32,16 +32,16 @@ > > namespace WebCore { > >-class WebGPURenderPassColorAttachmentDescriptor : public WebGPURenderPassAttachmentDescriptor { >+class WebGPURenderPassColorAttachmentDescriptor final : public WebGPURenderPassAttachmentDescriptor { > public: > virtual ~WebGPURenderPassColorAttachmentDescriptor(); >- static Ref<WebGPURenderPassColorAttachmentDescriptor> create(WebGPURenderingContext&, GPURenderPassColorAttachmentDescriptor&&); >+ static Ref<WebGPURenderPassColorAttachmentDescriptor> create(GPURenderPassColorAttachmentDescriptor&&); > > Vector<float> clearColor() const; > void setClearColor(const Vector<float>&); > > private: >- WebGPURenderPassColorAttachmentDescriptor(WebGPURenderingContext&, GPURenderPassColorAttachmentDescriptor&&); >+ WebGPURenderPassColorAttachmentDescriptor(GPURenderPassColorAttachmentDescriptor&&); > > const GPURenderPassAttachmentDescriptor& descriptor() const final; > bool isColorAttachmentDescriptor() const final { return true; } >Index: Source/WebCore/html/canvas/WebGPURenderPassDepthAttachmentDescriptor.cpp >=================================================================== >--- Source/WebCore/html/canvas/WebGPURenderPassDepthAttachmentDescriptor.cpp (revision 234342) >+++ Source/WebCore/html/canvas/WebGPURenderPassDepthAttachmentDescriptor.cpp (working copy) >@@ -28,18 +28,17 @@ > > #if ENABLE(WEBGPU) > >-#include "WebGPURenderingContext.h" > #include "WebGPUTexture.h" > > namespace WebCore { > >-Ref<WebGPURenderPassDepthAttachmentDescriptor> WebGPURenderPassDepthAttachmentDescriptor::create(WebGPURenderingContext& context, GPURenderPassDepthAttachmentDescriptor&& descriptor) >+Ref<WebGPURenderPassDepthAttachmentDescriptor> WebGPURenderPassDepthAttachmentDescriptor::create(GPURenderPassDepthAttachmentDescriptor&& descriptor) > { >- return adoptRef(*new WebGPURenderPassDepthAttachmentDescriptor(context, WTFMove(descriptor))); >+ return adoptRef(*new WebGPURenderPassDepthAttachmentDescriptor(WTFMove(descriptor))); > } > >-WebGPURenderPassDepthAttachmentDescriptor::WebGPURenderPassDepthAttachmentDescriptor(WebGPURenderingContext& context, GPURenderPassDepthAttachmentDescriptor&& descriptor) >- : WebGPURenderPassAttachmentDescriptor(context) >+WebGPURenderPassDepthAttachmentDescriptor::WebGPURenderPassDepthAttachmentDescriptor(GPURenderPassDepthAttachmentDescriptor&& descriptor) >+ : WebGPURenderPassAttachmentDescriptor() > , m_descriptor(WTFMove(descriptor)) > { > } >Index: Source/WebCore/html/canvas/WebGPURenderPassDepthAttachmentDescriptor.h >=================================================================== >--- Source/WebCore/html/canvas/WebGPURenderPassDepthAttachmentDescriptor.h (revision 234342) >+++ Source/WebCore/html/canvas/WebGPURenderPassDepthAttachmentDescriptor.h (working copy) >@@ -35,13 +35,13 @@ namespace WebCore { > class WebGPURenderPassDepthAttachmentDescriptor final : public WebGPURenderPassAttachmentDescriptor { > public: > virtual ~WebGPURenderPassDepthAttachmentDescriptor(); >- static Ref<WebGPURenderPassDepthAttachmentDescriptor> create(WebGPURenderingContext&, GPURenderPassDepthAttachmentDescriptor&&); >+ static Ref<WebGPURenderPassDepthAttachmentDescriptor> create(GPURenderPassDepthAttachmentDescriptor&&); > > double clearDepth() const; > void setClearDepth(double); > > private: >- WebGPURenderPassDepthAttachmentDescriptor(WebGPURenderingContext&, GPURenderPassDepthAttachmentDescriptor&&); >+ WebGPURenderPassDepthAttachmentDescriptor(GPURenderPassDepthAttachmentDescriptor&&); > > const GPURenderPassAttachmentDescriptor& descriptor() const final; > bool isColorAttachmentDescriptor() const final { return false; } >Index: Source/WebCore/html/canvas/WebGPURenderPassDescriptor.cpp >=================================================================== >--- Source/WebCore/html/canvas/WebGPURenderPassDescriptor.cpp (revision 234342) >+++ Source/WebCore/html/canvas/WebGPURenderPassDescriptor.cpp (working copy) >@@ -42,7 +42,7 @@ WebGPURenderPassDescriptor::~WebGPURende > WebGPURenderPassDepthAttachmentDescriptor& WebGPURenderPassDescriptor::depthAttachment() > { > if (!m_depthAttachment) >- m_depthAttachment = WebGPURenderPassDepthAttachmentDescriptor::create(*context(), m_descriptor.depthAttachment()); >+ m_depthAttachment = WebGPURenderPassDepthAttachmentDescriptor::create(m_descriptor.depthAttachment()); > return *m_depthAttachment; > } > >@@ -53,7 +53,7 @@ const Vector<RefPtr<WebGPURenderPassColo > ASSERT(!attachments.isEmpty()); > m_colorAttachments.reserveInitialCapacity(attachments.size()); > for (auto& attachment : attachments) >- m_colorAttachments.uncheckedAppend(WebGPURenderPassColorAttachmentDescriptor::create(*context(), WTFMove(attachment))); >+ m_colorAttachments.uncheckedAppend(WebGPURenderPassColorAttachmentDescriptor::create(WTFMove(attachment))); > } > return m_colorAttachments; > } >Index: Source/WebCore/html/canvas/WebGPURenderPassDescriptor.h >=================================================================== >--- Source/WebCore/html/canvas/WebGPURenderPassDescriptor.h (revision 234342) >+++ Source/WebCore/html/canvas/WebGPURenderPassDescriptor.h (working copy) >@@ -28,16 +28,17 @@ > #if ENABLE(WEBGPU) > > #include "GPURenderPassDescriptor.h" >-#include "WebGPUObject.h" > #include "WebGPURenderPassColorAttachmentDescriptor.h" > #include "WebGPURenderPassDepthAttachmentDescriptor.h" >+#include <wtf/RefCounted.h> >+#include <wtf/RefPtr.h> > #include <wtf/Vector.h> > > namespace WebCore { > >-class WebGPURenderPassDescriptor : public WebGPUObject { >+class WebGPURenderPassDescriptor : public RefCounted<WebGPURenderPassDescriptor> { > public: >- virtual ~WebGPURenderPassDescriptor(); >+ ~WebGPURenderPassDescriptor(); > static Ref<WebGPURenderPassDescriptor> create(); > > WebGPURenderPassDepthAttachmentDescriptor& depthAttachment(); >Index: Source/WebCore/html/canvas/WebGPURenderPassDescriptor.idl >=================================================================== >--- Source/WebCore/html/canvas/WebGPURenderPassDescriptor.idl (revision 234342) >+++ Source/WebCore/html/canvas/WebGPURenderPassDescriptor.idl (working copy) >@@ -26,7 +26,8 @@ > [ > Constructor, > Conditional=WEBGPU, >- EnabledAtRuntime=WebGPU >+ EnabledAtRuntime=WebGPU, >+ ImplementationLacksVTable > ] interface WebGPURenderPassDescriptor { > > readonly attribute sequence<WebGPURenderPassColorAttachmentDescriptor> colorAttachments; >Index: Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.cpp >=================================================================== >--- Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.cpp (revision 234342) >+++ Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.cpp (working copy) >@@ -30,14 +30,13 @@ > > namespace WebCore { > >-Ref<WebGPURenderPipelineColorAttachmentDescriptor> WebGPURenderPipelineColorAttachmentDescriptor::create(WebGPURenderingContext& context, GPURenderPipelineColorAttachmentDescriptor&& descriptor) >+Ref<WebGPURenderPipelineColorAttachmentDescriptor> WebGPURenderPipelineColorAttachmentDescriptor::create(GPURenderPipelineColorAttachmentDescriptor&& descriptor) > { >- return adoptRef(*new WebGPURenderPipelineColorAttachmentDescriptor(context, WTFMove(descriptor))); >+ return adoptRef(*new WebGPURenderPipelineColorAttachmentDescriptor(WTFMove(descriptor))); > } > >-WebGPURenderPipelineColorAttachmentDescriptor::WebGPURenderPipelineColorAttachmentDescriptor(WebGPURenderingContext& context, GPURenderPipelineColorAttachmentDescriptor&& descriptor) >- : WebGPUObject { &context } >- , m_descriptor { WTFMove(descriptor) } >+WebGPURenderPipelineColorAttachmentDescriptor::WebGPURenderPipelineColorAttachmentDescriptor(GPURenderPipelineColorAttachmentDescriptor&& descriptor) >+ : m_descriptor { WTFMove(descriptor) } > { > } > >Index: Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.h >=================================================================== >--- Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.h (revision 234342) >+++ Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.h (working copy) >@@ -28,19 +28,20 @@ > #if ENABLE(WEBGPU) > > #include "GPURenderPipelineColorAttachmentDescriptor.h" >-#include "WebGPUObject.h" >+#include <wtf/Ref.h> >+#include <wtf/RefCounted.h> > > namespace WebCore { > >-class WebGPURenderPipelineColorAttachmentDescriptor : public WebGPUObject { >+class WebGPURenderPipelineColorAttachmentDescriptor : public RefCounted<WebGPURenderPipelineColorAttachmentDescriptor> { > public: >- static Ref<WebGPURenderPipelineColorAttachmentDescriptor> create(WebGPURenderingContext&, GPURenderPipelineColorAttachmentDescriptor&&); >+ static Ref<WebGPURenderPipelineColorAttachmentDescriptor> create(GPURenderPipelineColorAttachmentDescriptor&&); > > unsigned pixelFormat() const; > void setPixelFormat(unsigned); > > private: >- WebGPURenderPipelineColorAttachmentDescriptor(WebGPURenderingContext&, GPURenderPipelineColorAttachmentDescriptor&&); >+ WebGPURenderPipelineColorAttachmentDescriptor(GPURenderPipelineColorAttachmentDescriptor&&); > > GPURenderPipelineColorAttachmentDescriptor m_descriptor; > }; >Index: Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.idl >=================================================================== >--- Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.idl (revision 234342) >+++ Source/WebCore/html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.idl (working copy) >@@ -25,7 +25,8 @@ > > [ > Conditional=WEBGPU, >- EnabledAtRuntime=WebGPU >+ EnabledAtRuntime=WebGPU, >+ ImplementationLacksVTable > ] interface WebGPURenderPipelineColorAttachmentDescriptor { > > attribute unsigned long pixelFormat; // should be MTLPixelFormat >Index: Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.cpp >=================================================================== >--- Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.cpp (revision 234342) >+++ Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.cpp (working copy) >@@ -32,7 +32,6 @@ > #include "GPURenderPipelineColorAttachmentDescriptor.h" > #include "WebGPUFunction.h" > #include "WebGPURenderPipelineColorAttachmentDescriptor.h" >-#include "WebGPURenderingContext.h" > > namespace WebCore { > >@@ -83,7 +82,7 @@ const Vector<RefPtr<WebGPURenderPipeline > auto attachments = m_descriptor.colorAttachments(); > m_colorAttachments.reserveInitialCapacity(attachments.size()); > for (auto& attachment : attachments) >- m_colorAttachments.uncheckedAppend(WebGPURenderPipelineColorAttachmentDescriptor::create(*context(), WTFMove(attachment))); >+ m_colorAttachments.uncheckedAppend(WebGPURenderPipelineColorAttachmentDescriptor::create(WTFMove(attachment))); > } > return m_colorAttachments; > } >Index: Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.h >=================================================================== >--- Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.h (revision 234342) >+++ Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.h (working copy) >@@ -28,8 +28,10 @@ > #if ENABLE(WEBGPU) > > #include "GPURenderPipelineDescriptor.h" >-#include "WebGPUObject.h" > #include "WebGPURenderPipelineColorAttachmentDescriptor.h" >+#include <wtf/Ref.h> >+#include <wtf/RefCounted.h> >+#include <wtf/RefPtr.h> > #include <wtf/Vector.h> > > namespace WebCore { >@@ -39,9 +41,9 @@ class GPURenderPipelineDescriptor; > class WebGPUFunction; > class WebGPURenderPipelineColorAttachmentDescriptor; > >-class WebGPURenderPipelineDescriptor : public WebGPUObject { >+class WebGPURenderPipelineDescriptor : public RefCounted<WebGPURenderPipelineDescriptor> { > public: >- virtual ~WebGPURenderPipelineDescriptor(); >+ ~WebGPURenderPipelineDescriptor(); > static Ref<WebGPURenderPipelineDescriptor> create(); > > WebGPUFunction* vertexFunction() const; >Index: Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.idl >=================================================================== >--- Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.idl (revision 234342) >+++ Source/WebCore/html/canvas/WebGPURenderPipelineDescriptor.idl (working copy) >@@ -26,7 +26,8 @@ > [ > Constructor, > Conditional=WEBGPU, >- EnabledAtRuntime=WebGPU >+ EnabledAtRuntime=WebGPU, >+ ImplementationLacksVTable > ] interface WebGPURenderPipelineDescriptor { > > attribute WebGPUFunction? vertexFunction; >Index: Source/WebCore/html/canvas/WebGPURenderPipelineState.cpp >=================================================================== >--- Source/WebCore/html/canvas/WebGPURenderPipelineState.cpp (revision 234342) >+++ Source/WebCore/html/canvas/WebGPURenderPipelineState.cpp (working copy) >@@ -39,8 +39,7 @@ Ref<WebGPURenderPipelineState> WebGPURen > } > > WebGPURenderPipelineState::WebGPURenderPipelineState(WebGPURenderingContext& context, const GPURenderPipelineDescriptor& descriptor) >- : WebGPUObject { &context } >- , m_state { context.device(), descriptor } >+ : m_state { context.device(), descriptor } > { > } > >Index: Source/WebCore/html/canvas/WebGPURenderPipelineState.h >=================================================================== >--- Source/WebCore/html/canvas/WebGPURenderPipelineState.h (revision 234342) >+++ Source/WebCore/html/canvas/WebGPURenderPipelineState.h (working copy) >@@ -28,11 +28,14 @@ > #if ENABLE(WEBGPU) > > #include "GPURenderPipelineState.h" >-#include "WebGPUObject.h" >+#include <wtf/Ref.h> >+#include <wtf/RefCounted.h> > > namespace WebCore { > >-class WebGPURenderPipelineState : public WebGPUObject { >+class WebGPURenderingContext; >+ >+class WebGPURenderPipelineState : public RefCounted<WebGPURenderPipelineState> { > public: > static Ref<WebGPURenderPipelineState> create(WebGPURenderingContext&, const GPURenderPipelineDescriptor&); > >Index: Source/WebCore/html/canvas/WebGPURenderPipelineState.idl >=================================================================== >--- Source/WebCore/html/canvas/WebGPURenderPipelineState.idl (revision 234342) >+++ Source/WebCore/html/canvas/WebGPURenderPipelineState.idl (working copy) >@@ -25,7 +25,8 @@ > > [ > Conditional=WEBGPU, >- EnabledAtRuntime=WebGPU >+ EnabledAtRuntime=WebGPU, >+ ImplementationLacksVTable > ] interface WebGPURenderPipelineState { > > attribute DOMString label; >Index: Source/WebCore/html/canvas/WebGPUTexture.cpp >=================================================================== >--- Source/WebCore/html/canvas/WebGPUTexture.cpp (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUTexture.cpp (working copy) >@@ -32,9 +32,9 @@ > > namespace WebCore { > >-Ref<WebGPUTexture> WebGPUTexture::createFromDrawableTexture(WebGPURenderingContext& context, GPUTexture&& texture) >+Ref<WebGPUTexture> WebGPUTexture::createFromDrawableTexture(GPUTexture&& texture) > { >- return adoptRef(*new WebGPUTexture(context, WTFMove(texture))); >+ return adoptRef(*new WebGPUTexture(WTFMove(texture))); > } > > Ref<WebGPUTexture> WebGPUTexture::create(WebGPURenderingContext& context, const GPUTextureDescriptor& descriptor) >@@ -42,15 +42,13 @@ Ref<WebGPUTexture> WebGPUTexture::create > return adoptRef(*new WebGPUTexture(context, descriptor)); > } > >-WebGPUTexture::WebGPUTexture(WebGPURenderingContext& context, GPUTexture&& texture) >- : WebGPUObject { &context } >- , m_texture { WTFMove(texture) } >+WebGPUTexture::WebGPUTexture(GPUTexture&& texture) >+ : m_texture { WTFMove(texture) } > { > } > > WebGPUTexture::WebGPUTexture(WebGPURenderingContext& context, const GPUTextureDescriptor& descriptor) >- : WebGPUObject { &context } >- , m_texture { context.device(), descriptor } >+ : m_texture { context.device(), descriptor } > { > } > >Index: Source/WebCore/html/canvas/WebGPUTexture.h >=================================================================== >--- Source/WebCore/html/canvas/WebGPUTexture.h (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUTexture.h (working copy) >@@ -28,15 +28,16 @@ > #if ENABLE(WEBGPU) > > #include "GPUTexture.h" >-#include "WebGPUObject.h" >+#include <wtf/Ref.h> >+#include <wtf/RefCounted.h> > > namespace WebCore { > > class GPUTextureDescriptor; > >-class WebGPUTexture : public WebGPUObject { >+class WebGPUTexture : public RefCounted<WebGPUTexture> { > public: >- static Ref<WebGPUTexture> createFromDrawableTexture(WebGPURenderingContext&, GPUTexture&&); >+ static Ref<WebGPUTexture> createFromDrawableTexture(GPUTexture&&); > static Ref<WebGPUTexture> create(WebGPURenderingContext&, const GPUTextureDescriptor&); > > unsigned width() const { return m_texture.width(); } >@@ -45,7 +46,7 @@ public: > const GPUTexture& texture() const { return m_texture; } > > private: >- WebGPUTexture(WebGPURenderingContext&, GPUTexture&&); >+ WebGPUTexture(GPUTexture&&); > WebGPUTexture(WebGPURenderingContext&, const GPUTextureDescriptor&); > > GPUTexture m_texture; >Index: Source/WebCore/html/canvas/WebGPUTexture.idl >=================================================================== >--- Source/WebCore/html/canvas/WebGPUTexture.idl (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUTexture.idl (working copy) >@@ -25,7 +25,8 @@ > > [ > Conditional=WEBGPU, >- EnabledAtRuntime=WebGPU >+ EnabledAtRuntime=WebGPU, >+ ImplementationLacksVTable > ] interface WebGPUTexture { > > readonly attribute unsigned long width; >Index: Source/WebCore/html/canvas/WebGPUTextureDescriptor.h >=================================================================== >--- Source/WebCore/html/canvas/WebGPUTextureDescriptor.h (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUTextureDescriptor.h (working copy) >@@ -28,11 +28,12 @@ > #if ENABLE(WEBGPU) > > #include "GPUTextureDescriptor.h" >-#include "WebGPUObject.h" >+#include <wtf/Ref.h> >+#include <wtf/RefCounted.h> > > namespace WebCore { > >-class WebGPUTextureDescriptor : public WebGPUObject { >+class WebGPUTextureDescriptor : public RefCounted<WebGPUTextureDescriptor> { > public: > static Ref<WebGPUTextureDescriptor> create(unsigned pixelFormat, unsigned width, unsigned height, bool mipmapped); > >Index: Source/WebCore/html/canvas/WebGPUTextureDescriptor.idl >=================================================================== >--- Source/WebCore/html/canvas/WebGPUTextureDescriptor.idl (revision 234342) >+++ Source/WebCore/html/canvas/WebGPUTextureDescriptor.idl (working copy) >@@ -26,7 +26,8 @@ > [ > Constructor(unsigned long pixelFormat, unsigned long width, unsigned long height, boolean mipmapped), > Conditional=WEBGPU, >- EnabledAtRuntime=WebGPU >+ EnabledAtRuntime=WebGPU, >+ ImplementationLacksVTable > ] interface WebGPUTextureDescriptor { > > attribute unsigned long textureType;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188114
:
345986
|
345994
|
345999
|
346036
|
346038
|
346039
|
346040
|
346041
|
346042
|
346052
|
346073
|
346554