Match GraphicsContext3D with correct virtual screen using registryID
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 30 Jul 2018 19:52:51 +0000 (19:52 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 30 Jul 2018 19:52:51 +0000 (19:52 +0000)
commit4084b587c882fb28bdda8f7d425a2f7431fdab85
treefd68fb0eaf6308428d291d81e504eb889000713f
parent66ad3c4517e4dce48d00442c7ce6e494af21d81d
Match GraphicsContext3D with correct virtual screen using registryID
https://bugs.webkit.org/show_bug.cgi?id=188072
<rdar://problem/42634940>

Patch by Justin Fan <justin_fan@apple.com> on 2018-07-30
Reviewed by Dean Jackson.

Follow up to https://bugs.webkit.org/show_bug.cgi?id=187750. Rather than matching rendererIDs,
which can vary between processes, match GPU to display using registryID that is unique to a GPU,
which was added to CGL in MacOS 10.13.

No new tests. Manually tested on MacBookPro13,3 and iMacPro1,1 with Apple DisplayPort Cinema Display
and RX 580 external GPU.

* platform/PlatformScreen.h:
* platform/ScreenProperties.h:
(WebCore::ScreenData::encode const):
(WebCore::ScreenData::decode):
* platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
(WebCore::setGPUByRegistryID):
(WebCore::setGPUByDisplayMask):
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::screenDidChange):
(WebCore::identifyAndSetCurrentGPU): Deleted.
* platform/mac/PlatformScreenMac.mm:
(WebCore::collectScreenProperties):
(WebCore::primaryRegistryID):
(WebCore::registryIDForDisplay):
(WebCore::registryIDForDisplayMask):
(WebCore::rendererIDForDisplayMask): Deleted.
(WebCore::rendererIDForDisplay): Deleted.
(WebCore::primaryRendererID): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/PlatformScreen.h
Source/WebCore/platform/ScreenProperties.h
Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm
Source/WebCore/platform/mac/PlatformScreenMac.mm