Skip to content

Commit 44f3c87

Browse files
committed
GraphicContext: Use std::stack with a std::vector
Every frame the `m_transforms` is filled and emptied. By default the `std::stack` uses a `std::deque` which releases its memory when it shrinks. This causes constant allocations and deallocations. With a `std::vector` this doesn't happen.
1 parent b905c9f commit 44f3c87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xbmc/windowing/GraphicContext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ class CGraphicContext : public CCriticalSection
270270

271271
UITransform m_guiTransform;
272272
UITransform m_finalTransform;
273-
std::stack<UITransform> m_transforms;
273+
std::stack<UITransform, std::vector<UITransform>> m_transforms;
274274
RENDER_STEREO_VIEW m_stereoView = RENDER_STEREO_VIEW_OFF;
275275
RENDER_STEREO_MODE m_stereoMode = RENDER_STEREO_MODE_OFF;
276276
RENDER_STEREO_MODE m_nextStereoMode = RENDER_STEREO_MODE_OFF;

0 commit comments

Comments
 (0)