[frontend] SkModPlayer re-add overdraw to mitigate GPU upload race condition.
This commit is contained in:
parent
df338e0b61
commit
1f82229e8a
1 changed files with 5 additions and 3 deletions
|
|
@ -127,8 +127,8 @@ const player = ref(new ChiptuneJsPlayer(new ChiptuneJsConfig()));
|
||||||
const maxRowNumbers = 0xFF;
|
const maxRowNumbers = 0xFF;
|
||||||
// Mainly used to hide race condition connected to canvas transfer to graphics buffer when software rendering.
|
// Mainly used to hide race condition connected to canvas transfer to graphics buffer when software rendering.
|
||||||
// Found that 2 is a good default but needs more testing.
|
// Found that 2 is a good default but needs more testing.
|
||||||
const overdraw = 0;
|
const overdraw = 2;
|
||||||
const rowBuffer = 26 + overdraw;
|
const rowBuffer = 26 + (overdraw * 2);
|
||||||
// It would be a great option for users to set themselves.
|
// It would be a great option for users to set themselves.
|
||||||
const maxChannelLimit = 0xFF;
|
const maxChannelLimit = 0xFF;
|
||||||
let buffer = null;
|
let buffer = null;
|
||||||
|
|
@ -204,6 +204,9 @@ function populateCanvasSlices () {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
// That 3 is a magic number for inline-grid re-alignment, if at any point sliceDisplay switches to grid remember to remove that 3.
|
||||||
|
if (sliceDisplay.value) sliceDisplay.value.style.top = -(overdraw * CHAR_HEIGHT + 3) + 'px';
|
||||||
|
|
||||||
player.value.load(url).then((result) => {
|
player.value.load(url).then((result) => {
|
||||||
buffer = result;
|
buffer = result;
|
||||||
try {
|
try {
|
||||||
|
|
@ -620,7 +623,6 @@ onDeactivated(() => {
|
||||||
position: relative;
|
position: relative;
|
||||||
background-color: black;
|
background-color: black;
|
||||||
image-rendering: pixelated;
|
image-rendering: pixelated;
|
||||||
top: -3px;
|
|
||||||
|
|
||||||
.patternSlice {
|
.patternSlice {
|
||||||
image-rendering: pixelated;
|
image-rendering: pixelated;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue