Remove unused code

This commit is contained in:
Kovid Goyal 2023-09-17 08:47:28 +05:30
parent 863adb3e8d
commit 8a211fa689
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -6,6 +6,7 @@ import (
"fmt"
"image"
"image/gif"
"kitty/tools/tty"
"kitty/tools/tui/graphics"
"kitty/tools/utils"
"kitty/tools/utils/images"
@ -121,19 +122,7 @@ func load_one_frame_image(ctx *images.Context, imgd *image_data, src *opened_inp
return
}
func calc_min_gap(gaps []int) int {
// Some broken GIF images have all zero gaps, browsers with their usual
// idiot ideas render these with a default 100ms gap https://bugzilla.mozilla.org/show_bug.cgi?id=125137
// Browsers actually force a 100ms gap at any zero gap frame, but that
// just means it is impossible to deliberately use zero gap frames for
// sophisticated blending, so we dont do that.
max_gap := utils.Max(0, gaps...)
min_gap := 0
if max_gap <= 0 {
min_gap = 10
}
return min_gap
}
var debugprintln = tty.DebugPrintln
func (frame *image_frame) set_disposal(anchor_frame int, disposal byte) int {
anchor_frame, frame.compose_onto = images.SetGIFFrameDisposal(frame.number, anchor_frame, disposal)