mirror of
https://github.com/citra-emu/citra-nightly.git
synced 2024-12-25 13:45:37 +00:00
primitive_assembly: Take triangle_handler by reference
Avoids copying the std::function when we don't need to. Particularly given the std::function isn't actually stored anywhere, so there's no need to move it.
This commit is contained in:
parent
e38e79e27e
commit
59bb84b86c
|
@ -15,7 +15,7 @@ PrimitiveAssembler<VertexType>::PrimitiveAssembler(PipelineRegs::TriangleTopolog
|
|||
|
||||
template <typename VertexType>
|
||||
void PrimitiveAssembler<VertexType>::SubmitVertex(const VertexType& vtx,
|
||||
TriangleHandler triangle_handler) {
|
||||
const TriangleHandler& triangle_handler) {
|
||||
switch (topology) {
|
||||
case PipelineRegs::TriangleTopology::List:
|
||||
case PipelineRegs::TriangleTopology::Shader:
|
||||
|
|
|
@ -29,7 +29,7 @@ struct PrimitiveAssembler {
|
|||
* NOTE: We could specify the triangle handler in the constructor, but this way we can
|
||||
* keep event and handler code next to each other.
|
||||
*/
|
||||
void SubmitVertex(const VertexType& vtx, TriangleHandler triangle_handler);
|
||||
void SubmitVertex(const VertexType& vtx, const TriangleHandler& triangle_handler);
|
||||
|
||||
/**
|
||||
* Invert the vertex order of the next triangle. Called by geometry shader emitter.
|
||||
|
|
Loading…
Reference in a new issue