UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SlateDrawBuffer.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "UObject/GCObject.h"
9#include "Tasks/Task.h"
10
11#include <atomic>
12
14class SWindow;
15
20{
21public:
25
28
31
38
41
46 {
47 return WindowElementLists;
48 }
49
56 SLATECORE_API bool Lock();
57
63 SLATECORE_API void Unlock(const UE::Tasks::FTask& PrerequisiteTask);
64
65 void Unlock()
66 {
68 }
69
71 bool IsLocked() const
72 {
73 return bIsLocked;
74 }
75
77 SLATECORE_API virtual void AddReferencedObjects(FReferenceCollector& Collector) override;
78 virtual FString GetReferencerName() const
79 {
80 return TEXT("FSlateDrawBuffer for Uncached Elements");
81 }
82
83private:
84 // List of window element lists
86
87 // List of window element lists that we store from the previous frame
88 // that we restore if they're requested again.
89 TArray< TSharedRef<FSlateWindowElementList> > WindowElementListsPool;
90
91 FCriticalSection GCLock;
92 std::atomic<bool> bIsLocked;
93 bool bIsLockedBySlateThread;
94
95 // Last recorded version from the render. The WindowElementListsPool is emptied when this changes.
96 uint32 ResourceVersion;
97
98public:
100};
#define TEXT(x)
Definition Platform.h:1272
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE::FPlatformRecursiveMutex FCriticalSection
Definition CriticalSection.h:53
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition GCObject.h:128
Definition UObjectGlobals.h:2492
Definition SlateDrawBuffer.h:20
SLATECORE_API FSlateWindowElementList & AddWindowElementList(TSharedRef< SWindow > ForWindow)
Definition SlateDrawBuffer.cpp:21
SLATECORE_API void RemoveUnusedWindowElement(const TArray< SWindow * > &AllWindows)
Definition SlateDrawBuffer.cpp:49
virtual FString GetReferencerName() const
Definition SlateDrawBuffer.h:78
FDeprecateSlateVector2D ViewOffset
Definition SlateDrawBuffer.h:99
SLATECORE_API void ClearBuffer()
Definition SlateDrawBuffer.cpp:111
const TArray< TSharedRef< FSlateWindowElementList > > & GetWindowElementLists()
Definition SlateDrawBuffer.h:45
SLATECORE_API bool Lock()
Definition SlateDrawBuffer.cpp:67
virtual SLATECORE_API void AddReferencedObjects(FReferenceCollector &Collector) override
Definition SlateDrawBuffer.cpp:97
SLATECORE_API ~FSlateDrawBuffer()
SLATECORE_API void UpdateResourceVersion(uint32 NewResourceVersion)
Definition SlateDrawBuffer.cpp:139
void Unlock()
Definition SlateDrawBuffer.h:65
SLATECORE_API FSlateDrawBuffer()
Definition SlateDrawBuffer.cpp:13
bool IsLocked() const
Definition SlateDrawBuffer.h:71
Definition DrawElements.h:220
Definition SWindow.h:243
Definition Array.h:670
Definition SharedPointer.h:153