You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DataGridHeaderBorder.CacheFreezable method does not actually cache freezable brushes #6713
The logic is backwards in that it only caches if the indexed value is not null, versus caching if the indexed value is null. This will result in freezable values never being cached and any calls to GetCachedFreezable will always return a null value causing brushes to be created every time a rendering pass is performed for the specific theme.
The code should instead be:
privatestaticvoidCacheFreezable(Freezablefreezable,intindex){Debug.Assert(freezable.IsFrozen,"Cached Freezables should be frozen.");lock(_cacheAccess){if(_freezableCache[index]==null){_freezableCache[index]=freezable;}}}
Activity