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.
Created attachment 452654 [details] Patch
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.
(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.
Committed r290255 (?): <https://commits.webkit.org/r290255>
<rdar://problem/89247272>