Merging CL 2684004 using UE4_to_UE4-Orion

Implemented a basic slate resource handle for fast access without doing map lookups from Brush -> Rendering resource.  Not hooked up to anything yet

[CL 2686668 by Matt Kuhlenschmidt in Main branch]
This commit is contained in:
Matt Kuhlenschmidt
2015-09-10 13:50:53 -04:00
committed by matt.kuhlenschmidt@epicgames.com
parent 7830ea949d
commit 65e46bcce8
14 changed files with 160 additions and 10 deletions
@@ -10,6 +10,7 @@
DECLARE_DWORD_ACCUMULATOR_STAT(TEXT("Num Texture Atlases"), STAT_SlateNumTextureAtlases, STATGROUP_SlateMemory);
DECLARE_DWORD_ACCUMULATOR_STAT(TEXT("Num Non-Atlased Textures"), STAT_SlateNumNonAtlasedTextures, STATGROUP_SlateMemory);
DECLARE_DWORD_ACCUMULATOR_STAT(TEXT("Num Dynamic Textures"), STAT_SlateNumDynamicTextures, STATGROUP_SlateMemory);
DECLARE_CYCLE_STAT(TEXT("GetResource Time"), STAT_SlateGetResourceTime, STATGROUP_SlateVerbose);
FDynamicResourceMap::FDynamicResourceMap()
: TextureMemorySincePurge(0)
@@ -430,6 +431,8 @@ static void LoadUObjectForBrush( const FSlateBrush& InBrush )
FSlateShaderResourceProxy* FSlateRHIResourceManager::GetShaderResource( const FSlateBrush& InBrush )
{
SCOPE_CYCLE_COUNTER( STAT_SlateGetResourceTime );
check( IsThreadSafeForSlateRendering() );
FSlateShaderResourceProxy* Texture = NULL;