History

wip#1

rename layoutready to alltilesrendered as this is what the funciton returns

malc committed 4 years ago

Commit 01ff5cb1 parent 55e2f041 file · +17 −5Browse files

Unified · Split

main.ml+17−5
@@ -514,7 +514,7 @@ let preload pages = · 513 unmodified lines
514514 if conf.preload && !S.currently = Idle
515515 then load (preloadlayout !S.x !S.y !S.winw !S.winh)
516516
517−let layoutready layout =
517+let alltilesrendered layout =
518518 let exception E in
519519 let rec fold ls =
520520 match ls with
@@ -1160,8 +1160,8 @@ let act cmds = · 639 unmodified lines
11601160 | Textentry _ -> ()
11611161 );
11621162
1163− if visible && layoutready !S.layout
1164− then Glutils.postRedisplay "page";
1163+ if visible && alltilesrendered !S.layout
1164+ then assert false (* Glutils.postRedisplay "page"; *)
11651165 )
11661166
11671167 | Idle | Tiling _ | Outlining _ ->
@@ -1171,6 +1171,18 @@ let act cmds = · 3 unmodified lines
11711171 end
11721172
11731173 | "tile" , args ->
1174+ (*
1175+ C part is notifying us that it has finished redering a tile
1176+ valid = the tile fits current config (i.e. the settings with which
1177+ the tile has been rendered match current ones)
1178+
1179+ if the tile is not valid free it and issue loading/rendering commands
1180+ for the current layout
1181+
1182+ evict all the tiles that aren't part of preloadlayout
1183+ if tile is visible post redisplay
1184+ continue tiling
1185+ *)
11741186 let (x, y, opaques, size, t) =
11751187 scan args "%u %u %s %u %f" (fun x y p size t -> (x, y, p, size, t))
11761188 in
@@ -1179,7 +1191,7 @@ let act cmds = · 2 unmodified lines
11791191 | Tiling (l, pageopaque, cs, angle, gen, col, row, tilew, tileh) ->
11801192 vlog "tile %d [%d,%d] took %f sec" l.pageno col row t;
11811193 let layout =
1182− if conf.preload && layoutready !S.layout
1194+ if conf.preload && alltilesrendered !S.layout
11831195 then preloadlayout !S.x !S.y !S.winw !S.winh
11841196 else !S.layout
11851197 in
@@ -3929,7 +3941,7 @@ let display () = · 2743 unmodified lines
39293941 match !S.reload with
39303942 | Some (x, y, t) ->
39313943 if x != !S.x || y != !S.y || abs_float @@ now () -. t > 0.5
3932− || (!S.layout != [] && layoutready !S.layout)
3944+ || (!S.layout != [] && alltilesrendered !S.layout)
39333945 then (
39343946 S.reload := None;
39353947 display ()

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t