Removed now-unused ITexture.SetData() overload
This commit is contained in:
committed by
Matthias Mailänder
parent
cb8530fbae
commit
6f0509d235
@@ -92,24 +92,6 @@ namespace OpenRA.Platforms.Default
|
||||
}
|
||||
}
|
||||
|
||||
// An array of RGBA
|
||||
public void SetData(uint[,] colors)
|
||||
{
|
||||
VerifyThreadAffinity();
|
||||
var width = colors.GetUpperBound(1) + 1;
|
||||
var height = colors.GetUpperBound(0) + 1;
|
||||
|
||||
if (!Exts.IsPowerOf2(width) || !Exts.IsPowerOf2(height))
|
||||
throw new InvalidDataException($"Non-power-of-two array {width}x{height}");
|
||||
|
||||
Size = new Size(width, height);
|
||||
unsafe
|
||||
{
|
||||
fixed (uint* ptr = &colors[0, 0])
|
||||
SetData(new IntPtr(ptr), width, height);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetFloatData(float[] data, int width, int height)
|
||||
{
|
||||
VerifyThreadAffinity();
|
||||
|
||||
@@ -557,7 +557,6 @@ namespace OpenRA.Platforms.Default
|
||||
readonly Func<object> getSize;
|
||||
readonly Action<object> setEmpty;
|
||||
readonly Func<byte[]> getData;
|
||||
readonly Func<object, object> setData1;
|
||||
readonly Action<object> setData2;
|
||||
readonly Func<object, object> setData3;
|
||||
readonly Action<object> setData4;
|
||||
@@ -573,7 +572,6 @@ namespace OpenRA.Platforms.Default
|
||||
getSize = () => texture.Size;
|
||||
setEmpty = tuple => { var t = (ValueTuple<int, int>)tuple; texture.SetEmpty(t.Item1, t.Item2); };
|
||||
getData = () => texture.GetData();
|
||||
setData1 = colors => { texture.SetData((uint[,])colors); return null; };
|
||||
setData2 = tuple => { var t = (ValueTuple<byte[], int, int>)tuple; texture.SetData(t.Item1, t.Item2, t.Item3); };
|
||||
setData3 = tuple => { setData2(tuple); return null; };
|
||||
setData4 = tuple => { var t = (ValueTuple<float[], int, int>)tuple; texture.SetFloatData(t.Item1, t.Item2, t.Item3); };
|
||||
@@ -602,12 +600,6 @@ namespace OpenRA.Platforms.Default
|
||||
return device.Send(getData);
|
||||
}
|
||||
|
||||
public void SetData(uint[,] colors)
|
||||
{
|
||||
// We can't return until we are finished with the data, so we must Send here.
|
||||
device.Send(setData1, colors);
|
||||
}
|
||||
|
||||
public void SetData(byte[] colors, int width, int height)
|
||||
{
|
||||
// Objects 85000 bytes or more will be directly allocated in the Large Object Heap (LOH).
|
||||
|
||||
Reference in New Issue
Block a user