mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Remove unused code
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"image"
|
"image"
|
||||||
"image/gif"
|
"image/gif"
|
||||||
|
"kitty/tools/tty"
|
||||||
"kitty/tools/tui/graphics"
|
"kitty/tools/tui/graphics"
|
||||||
"kitty/tools/utils"
|
"kitty/tools/utils"
|
||||||
"kitty/tools/utils/images"
|
"kitty/tools/utils/images"
|
||||||
@@ -121,19 +122,7 @@ func load_one_frame_image(ctx *images.Context, imgd *image_data, src *opened_inp
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func calc_min_gap(gaps []int) int {
|
var debugprintln = tty.DebugPrintln
|
||||||
// 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
|
|
||||||
}
|
|
||||||
|
|
||||||
func (frame *image_frame) set_disposal(anchor_frame int, disposal byte) int {
|
func (frame *image_frame) set_disposal(anchor_frame int, disposal byte) int {
|
||||||
anchor_frame, frame.compose_onto = images.SetGIFFrameDisposal(frame.number, anchor_frame, disposal)
|
anchor_frame, frame.compose_onto = images.SetGIFFrameDisposal(frame.number, anchor_frame, disposal)
|
||||||
|
|||||||
Reference in New Issue
Block a user