-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WebXR] Refactor WebXROpaqueFramebuffer::setupFramebuffer #14172
[WebXR] Refactor WebXROpaqueFramebuffer::setupFramebuffer #14172
Conversation
EWS run on previous version of this PR (hash f12f4ac) |
// Cap the maximum multisample count at 4. Any more than this is likely overkill and will impact performance. | ||
return std::min(4, maxSampleCount); | ||
}; | ||
int sampleCount = (isAntialias) ? maxSamples(gl) : 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can probably assign sampleCount to directly calling the lambda immediately. We only use sampleCount if we're antialiased.
} | ||
return gl.checkFramebufferStatus(GL::FRAMEBUFFER) == GL::FRAMEBUFFER_COMPLETE; | ||
auto colorBuffer = allocateColorStorage(gl, sampleCount, m_width, m_height); | ||
bindColor(gl, colorBuffer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should be bindColorBuffer
PlatformGLObject depthBuffer = 0; | ||
PlatformGLObject stencilBuffer = 0; | ||
|
||
// FIXME: Does this need to be optional? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there are some non-Apple implementations that don't support the packed format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code was moved and pre-existed. I've added a // FIXME:
that we should do something depending upon context or remove the code.
f12f4ac
to
ff55789
Compare
EWS run on current version of this PR (hash ff55789) |
EWS run on previous version of this PR (hash ff55789) |
ff55789
to
3d87b20
Compare
EWS run on current version of this PR (hash 3d87b20) |
https://bugs.webkit.org/show_bug.cgi?id=257117 rdar://problem/109647523 Reviewed by Dean Jackson. Reduce the complicated nesting of if/else statement by extracting common parts into helper functions. No features changed. * LayoutTests/platform/wpe/imported/w3c/web-platform-tests/webxr/xrWebGLLayer_framebuffer_draw.https-expected.txt: * LayoutTests/platform/wpe/imported/w3c/web-platform-tests/webxr/xrWebGLLayer_opaque_framebuffer.https-expected.txt: * Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.cpp: (WebCore::WebXROpaqueFramebuffer::setupFramebuffer): (WebCore::WebXROpaqueFramebuffer::allocateRenderbufferStorage): (WebCore::WebXROpaqueFramebuffer::allocateColorStorage): (WebCore::WebXROpaqueFramebuffer::allocateDepthStencilStorage): (WebCore::WebXROpaqueFramebuffer::bindColor): (WebCore::WebXROpaqueFramebuffer::bindDepthStencil): * Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.h: * Source/WebCore/platform/graphics/GraphicsContextGL.h: Canonical link: https://commits.webkit.org/264466@main
3d87b20
to
12c38ed
Compare
Committed 264466@main (12c38ed): https://commits.webkit.org/264466@main Reviewed commits have been landed. Closing PR #14172 and removing active labels. |
12c38ed
3d87b20
π§ͺ styleπ iosπ macπ§ͺ bindingsπ ios-simπ mac-AS-debugπ§ͺ webkitperlπ§ͺ ios-wk2π§ͺ api-macπ gtkπ§ͺ ios-wk2-wptπ§ͺ mac-wk1π§ͺ gtk-wk2π§ͺ api-iosπ§ͺ mac-wk2π§ͺ api-gtkπ tvπ§ͺ mac-AS-debug-wk2π tv-simπ§ͺ mac-wk2-stressπ watch-sim