Remove some unrequired Sheet.CreateBuffer or Sheet.ReleaseBuffer calls.
- In CursorManager, we can release the buffer on the final sheet after loading cursors. We don't need to release the buffer on every sheet in the builder, as the builder will handle that. - In SpriteCache, we don't need to call CreateBuffer explicitly, as the builder will do that for us. - In RadarWidget, we don't need to call CreateBuffer explicitly, as GetData will do that for us.
This commit is contained in:
@@ -97,7 +97,6 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
|
||||
// The four layers are stored in a 2x2 grid within a single texture
|
||||
radarSheet = new Sheet(SheetType.BGRA, new Size(2 * previewWidth, 2 * previewHeight).NextPowerOf2());
|
||||
radarSheet.CreateBuffer();
|
||||
radarData = radarSheet.GetData();
|
||||
|
||||
MapBoundsChanged();
|
||||
|
||||
Reference in New Issue
Block a user