WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
236891
[WebGPU] Tracer bullet part 4: Move Device's construction methods to the files of the things they create
https://bugs.webkit.org/show_bug.cgi?id=236891
Summary
[WebGPU] Tracer bullet part 4: Move Device's construction methods to the file...
Myles C. Maxfield
Reported
2022-02-19 13:34:32 PST
Device is kind of a factory object, and has lots of methods which create other objects in the API. To avoid Device.cpp becoming a catch-all place for tons of unrelated creation routines, this patch moves the routine that creates an X into X.mm.
Attachments
Patch
(14.14 KB, patch)
2022-02-19 13:36 PST
,
Myles C. Maxfield
dino
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Myles C. Maxfield
Comment 1
2022-02-19 13:36:09 PST
Created
attachment 452654
[details]
Patch
Dean Jackson
Comment 2
2022-02-21 09:22:35 PST
Comment on
attachment 452654
[details]
Patch I'm not sure this is any better. Now one needs to remember that Device::create methods are not in Device.mm. But either way is fine.
Myles C. Maxfield
Comment 3
2022-02-21 11:00:08 PST
(In reply to Dean Jackson from
comment #2
)
> Comment on
attachment 452654
[details]
> Patch > > I'm not sure this is any better. Now one needs to remember that > Device::create methods are not in Device.mm. But either way is fine.
Yeah. I think the principle here is "keep related concepts together." The creation routines deal deeply with the guts of the objects they create, so I figure that code should be close to the rest of the routines in the objects.
Myles C. Maxfield
Comment 4
2022-02-21 11:23:45 PST
Committed
r290255
(?): <
https://commits.webkit.org/r290255
>
Radar WebKit Bug Importer
Comment 5
2022-02-21 11:24:19 PST
<
rdar://problem/89247272
>
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