libdraw: remove flushimage calls from fontresize() and loadchar()

This commit is contained in:
cinap_lenrek 2016-03-12 22:01:43 +01:00
parent 31c3941e87
commit 84851b33cf

View file

@ -296,7 +296,6 @@ loadchar(Font *f, Rune r, Cacheinfo *c, int h, int noflush, char **subfontname)
c->left = fi->left;
if(f->display == nil)
return 1;
flushimage(f->display, 0); /* flush any pending errors */
b = bufimage(f->display, 37);
if(b == nil)
return 0;
@ -340,7 +339,6 @@ fontresize(Font *f, int wid, int ncache, int depth)
fprint(2, "font cache resize failed: %r\n");
goto Return;
}
flushimage(d, 0); /* flush any pending errors */
b = bufimage(d, 1+4+4+1);
if(b == nil){
freeimage(new);
@ -350,11 +348,6 @@ fontresize(Font *f, int wid, int ncache, int depth)
BPLONG(b+1, new->id);
BPLONG(b+5, ncache);
b[9] = f->ascent;
if(flushimage(d, 0) < 0){
fprint(2, "resize: init failed: %r\n");
freeimage(new);
goto Return;
}
freeimage(f->cacheimage);
f->cacheimage = new;
Nodisplay: