Title: [295484] trunk/Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBM.cpp
- Revision
- 295484
- Author
- commit-qu...@webkit.org
- Date
- 2022-06-13 02:17:27 -0700 (Mon, 13 Jun 2022)
Log Message
[GBM] Overzealous attaching of GL texture as color attachment to the default framebuffer
https://bugs.webkit.org/show_bug.cgi?id=241462
Patch by Žan Doberšek <zdober...@igalia.com> on 2022-06-13
Reviewed by Alejandro G. Castro.
In GraphicsContextGLGBM::prepareTexture(), there's no need to repeatedly
reattach the texture objec to the default framebuffer. With GraphicsContextGLGBM
this is only done when (re)sizing the framebuffer. The attached texture later
isn't switched out for some other texture, it remains in place. What does change
is the backing DMABuf-based EGLImage, which is updated upon the next
make-context-current request.
This means framebuffer operations here, after any required multisampling is
resolved, are not required. Only thing that remains is the GL_Flush() call.
* Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBM.cpp:
(WebCore::GraphicsContextGLGBM::prepareTexture):
Canonical link: https://commits.webkit.org/251489@main
Modified Paths
Diff
Modified: trunk/Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBM.cpp (295483 => 295484)
--- trunk/Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBM.cpp 2022-06-13 08:09:29 UTC (rev 295483)
+++ trunk/Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBM.cpp 2022-06-13 09:17:27 UTC (rev 295484)
@@ -355,12 +355,7 @@
if (contextAttributes().antialias)
resolveMultisamplingIfNecessary();
- GL_BindFramebuffer(GL_FRAMEBUFFER, m_fbo);
- GL_FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, drawingBufferTextureTarget(), m_texture, 0);
GL_Flush();
-
- if (m_state.boundDrawFBO != m_fbo)
- GL_BindFramebuffer(GraphicsContextGL::FRAMEBUFFER, m_state.boundDrawFBO);
}
bool GraphicsContextGLGBM::reshapeDisplayBufferBacking()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes