No need to update the palette count on resize

This commit is contained in:
themode 2022-02-27 01:14:57 +01:00
parent 5579415513
commit 41862c576b

View File

@ -32,7 +32,7 @@ final class FlexiblePalette implements SpecializedPalette, Cloneable {
// Specific to this palette type
private final AdaptivePalette adaptivePalette;
private int bitsPerEntry;
private int count = 0;
private int count;
private long[] values;
// palette index = value
@ -315,8 +315,8 @@ final class FlexiblePalette implements SpecializedPalette, Cloneable {
palette.valueToPaletteMap = valueToPaletteMap;
getAll(palette::set);
this.bitsPerEntry = palette.bitsPerEntry;
this.count = palette.count;
this.values = palette.values;
assert this.count == palette.count;
}
private int getPaletteIndex(int value) {