WebKit Bugzilla
Attachment 341698 Details for
Bug 186163
: Add OpenGL display mask to WebPage creation parameters.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186163-20180531153525.patch (text/plain), 6.87 KB, created by
Per Arne Vollan
on 2018-05-31 15:35:26 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Per Arne Vollan
Created:
2018-05-31 15:35:26 PDT
Size:
6.87 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 232301) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,22 @@ >+2018-05-31 Per Arne Vollan <pvollan@apple.com> >+ >+ Add OpenGL display mask to WebPage creation parameters. >+ https://bugs.webkit.org/show_bug.cgi?id=186163 >+ <rdar://problem/40634504> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ To make sure the OpenGL display mask is always available, include it in the WebPage creation parameters. >+ The OpenGL display mask is sent to the WebProcess when the platform display ID changes, but that is not >+ early enough in all cases. If the OpenGL display mask is not set, only OpenGL software rendering is offered >+ on some hardware configurations. >+ >+ No new tests, since it is not trivial to test whether OpenGL rendering is hardware accelerated. >+ >+ * platform/PlatformScreen.h: >+ * platform/mac/PlatformScreenMac.mm: >+ (WebCore::displayID): >+ > 2018-05-30 Jer Noble <jer.noble@apple.com> > > Media elements outside fullscreen should not be considered main content. >Index: Source/WebCore/platform/PlatformScreen.h >=================================================================== >--- Source/WebCore/platform/PlatformScreen.h (revision 232301) >+++ Source/WebCore/platform/PlatformScreen.h (working copy) >@@ -81,7 +81,9 @@ WEBCORE_EXPORT CGColorSpaceRef screenCol > #if PLATFORM(MAC) > struct ScreenProperties; > >-NSScreen *screen(NSWindow *); >+WEBCORE_EXPORT PlatformDisplayID displayID(NSScreen *); >+ >+WEBCORE_EXPORT NSScreen *screen(NSWindow *); > NSScreen *screen(PlatformDisplayID); > > FloatRect screenRectForDisplay(PlatformDisplayID); >Index: Source/WebCore/platform/mac/PlatformScreenMac.mm >=================================================================== >--- Source/WebCore/platform/mac/PlatformScreenMac.mm (revision 232301) >+++ Source/WebCore/platform/mac/PlatformScreenMac.mm (working copy) >@@ -46,7 +46,7 @@ namespace WebCore { > // These functions scale between screen and page coordinates because JavaScript/DOM operations > // assume that the screen and the page share the same coordinate system. > >-static PlatformDisplayID displayID(NSScreen *screen) >+PlatformDisplayID displayID(NSScreen *screen) > { > ASSERT(hasProcessPrivilege(ProcessPrivilege::CanCommunicateWithWindowServer)); > return [[[screen deviceDescription] objectForKey:@"NSScreenNumber"] intValue]; >Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 232373) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,25 @@ >+2018-05-31 Per Arne Vollan <pvollan@apple.com> >+ >+ Add OpenGL display mask to WebPage creation parameters. >+ https://bugs.webkit.org/show_bug.cgi?id=186163 >+ <rdar://problem/40634504> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ To make sure the OpenGL display mask is always available, include it in the WebPage creation parameters. >+ The OpenGL display mask is sent to the WebProcess when the platform display ID changes, but that is not >+ early enough in all cases. If the OpenGL display mask is not set, only OpenGL software rendering is offered >+ on some hardware configurations. >+ >+ * Shared/WebPageCreationParameters.cpp: >+ (WebKit::WebPageCreationParameters::encode const): >+ (WebKit::WebPageCreationParameters::decode): >+ * Shared/WebPageCreationParameters.h: >+ * UIProcess/WebPageProxy.cpp: >+ (WebKit::WebPageProxy::creationParameters): >+ * WebProcess/WebPage/WebPage.cpp: >+ (WebKit::m_credentialsMessenger): >+ > 2018-05-31 Brent Fulgham <bfulgham@apple.com> > > Add a rule to allow reading files with prefix /private/var/db/CVMS/cvmsCodeSignObj >Index: Source/WebKit/Shared/WebPageCreationParameters.cpp >=================================================================== >--- Source/WebKit/Shared/WebPageCreationParameters.cpp (revision 232301) >+++ Source/WebKit/Shared/WebPageCreationParameters.cpp (working copy) >@@ -119,6 +119,9 @@ void WebPageCreationParameters::encode(I > #if ENABLE(CONTENT_EXTENSIONS) > encoder << contentRuleLists; > #endif >+#if PLATFORM(MAC) >+ encoder << displayMask; >+#endif > } > > std::optional<WebPageCreationParameters> WebPageCreationParameters::decode(IPC::Decoder& decoder) >@@ -343,6 +346,11 @@ std::optional<WebPageCreationParameters> > parameters.contentRuleLists = WTFMove(*contentRuleLists); > #endif > >+#if PLATFORM(MAC) >+ if (!decoder.decode(parameters.displayMask)) >+ return std::nullopt; >+#endif >+ > return WTFMove(parameters); > } > >Index: Source/WebKit/Shared/WebPageCreationParameters.h >=================================================================== >--- Source/WebKit/Shared/WebPageCreationParameters.h (revision 232301) >+++ Source/WebKit/Shared/WebPageCreationParameters.h (working copy) >@@ -185,6 +185,10 @@ struct WebPageCreationParameters { > #if ENABLE(CONTENT_EXTENSIONS) > Vector<std::pair<String, WebCompiledContentRuleListData>> contentRuleLists; > #endif >+ >+#if PLATFORM(MAC) >+ CGOpenGLDisplayMask displayMask { 0 }; >+#endif > }; > > } // namespace WebKit >Index: Source/WebKit/UIProcess/WebPageProxy.cpp >=================================================================== >--- Source/WebKit/UIProcess/WebPageProxy.cpp (revision 232301) >+++ Source/WebKit/UIProcess/WebPageProxy.cpp (working copy) >@@ -6144,6 +6144,12 @@ WebPageCreationParameters WebPageProxy:: > parameters.applicationManifest = m_configuration->applicationManifest() ? std::optional<WebCore::ApplicationManifest>(m_configuration->applicationManifest()->applicationManifest()) : std::nullopt; > #endif > >+#if PLATFORM(MAC) >+ auto screen = WebCore::screen(m_pageClient.platformWindow()); >+ auto displayID = WebCore::displayID(screen); >+ parameters.displayMask = CGDisplayIDToOpenGLDisplayMask(displayID); >+#endif >+ > m_process->addWebUserContentControllerProxy(m_userContentController, parameters); > > return parameters; >Index: Source/WebKit/WebProcess/WebPage/WebPage.cpp >=================================================================== >--- Source/WebKit/WebProcess/WebPage/WebPage.cpp (revision 232301) >+++ Source/WebKit/WebProcess/WebPage/WebPage.cpp (working copy) >@@ -156,6 +156,7 @@ > #include <WebCore/FrameLoadRequest.h> > #include <WebCore/FrameLoaderTypes.h> > #include <WebCore/FrameView.h> >+#include <WebCore/GraphicsContext3D.h> > #include <WebCore/HTMLAttachmentElement.h> > #include <WebCore/HTMLFormElement.h> > #include <WebCore/HTMLImageElement.h> >@@ -617,6 +618,10 @@ WebPage::WebPage(uint64_t pageID, WebPag > setViewportConfigurationViewLayoutSize(parameters.viewportConfigurationViewLayoutSize); > setMaximumUnobscuredSize(parameters.maximumUnobscuredSize); > #endif >+ >+#if PLATFORM(MAC) >+ GraphicsContext3D::setOpenGLDisplayMask(parameters.displayMask); >+#endif > } > > #if ENABLE(WEB_RTC)
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 186163
:
341695
|
341698
|
341699