mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 17:40:39 +00:00
Refactor rdcstr with small-string and literal-string optimisations
* rdcstr no longer inherits from rdcarray, it implements all functionality itself. * There are now three representations: - Heap-allocated, same as how rdcarray behaves. - Local-allocated, for small strings we store them in a union array. - Compile-time literal, only created from user-defined literals. * The main observation is that a lot of RenderDoc's strings are compile-time literals either from struct names, member names, or stringified enum values. Storing these directly and allowing them to be moved and copied quickly saves on allocations and time. When the string is modified, it's copied to one of the other formats.
This commit is contained in:
@@ -2805,7 +2805,7 @@ void TextureViewer::OnEventChanged(uint32_t eventId)
|
||||
QString bindName = (copy || clear) ? tr("Destination") : QString();
|
||||
QString slotName = (copy || clear)
|
||||
? tr("DST")
|
||||
: (m_Ctx.CurPipelineState().OutputAbbrev() + QString::number(rt));
|
||||
: QString(m_Ctx.CurPipelineState().OutputAbbrev() + QString::number(rt));
|
||||
|
||||
InitResourcePreview(prev, RTs[rt].resourceId, RTs[rt].typeHint, false, follow, bindName,
|
||||
slotName);
|
||||
|
||||
Reference in New Issue
Block a user