[webkit-changes] [WebKit/WebKit] 227096: Use variable template declarations for GCGLSpanTup...
Žan Doberšek
noreply at github.com
Mon Oct 24 05:26:00 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 227096eba1370f2212bbfd7146580392846b1c7d
https://github.com/WebKit/WebKit/commit/227096eba1370f2212bbfd7146580392846b1c7d
Author: Žan Doberšek <zan at falconsigh.net>
Date: 2022-10-24 (Mon, 24 Oct 2022)
Changed paths:
M Source/WebCore/platform/graphics/GraphicsTypesGL.h
M Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp
M Source/WebKit/Platform/IPC/ArgumentCoders.h
M Source/WebKit/Platform/IPC/ArrayReferenceTuple.h
M Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp
Log Message:
-----------
Use variable template declarations for GCGLSpanTuple, ArrayReferenceTuple
https://bugs.webkit.org/show_bug.cgi?id=246923
Reviewed by Kimmo Kinnunen.
Provide a generic variable template for GCGLSpanTuple, dropping specializations for a
specific number of contained elements. The data pointers are now held in a std::tuple<>
object, and the getter data() method template expects an index value to perform access
into the tuple.
ArrayReferenceTuple is similarly adjusted, the variable template now handling any number
of elements instead of relying on specializations.
In RemoteGraphicsContextGLProxy implementation file, the helper toArrayReferenceTuple()
function is generalized into a variable template, constructing an ArrayReferenceTuple
from a given GCGLSpanTuple object according to the span tuple's size.
ArgumentCoder specializations for the ArrayReferenceTuple type are whittled down to a
single generic specialization that can cover any number of ArrayReferenceTuple elements.
* Source/WebCore/platform/graphics/GraphicsTypesGL.h:
(GCGLSpanTuple::GCGLSpanTuple):
(GCGLSpanTuple::data const):
* Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp:
(WebCore::GraphicsContextGLANGLE::multiDrawArraysANGLE):
(WebCore::GraphicsContextGLANGLE::multiDrawArraysInstancedANGLE):
(WebCore::GraphicsContextGLANGLE::multiDrawElementsANGLE):
(WebCore::GraphicsContextGLANGLE::multiDrawElementsInstancedANGLE):
(WebCore::GraphicsContextGLANGLE::multiDrawArraysInstancedBaseInstanceANGLE):
(WebCore::GraphicsContextGLANGLE::multiDrawElementsInstancedBaseVertexBaseInstanceANGLE):
* Source/WebKit/Platform/IPC/ArgumentCoders.h:
* Source/WebKit/Platform/IPC/ArrayReferenceTuple.h:
(IPC::ArrayReferenceTuple::ArrayReferenceTuple):
(IPC::ArrayReferenceTuple::size const):
(IPC::ArrayReferenceTuple::data const):
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:
Canonical link: https://commits.webkit.org/255911@main
More information about the webkit-changes
mailing list