blob: 6bc0e720754cccffc201598e1602e1d680efc32e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
static XImage *cached_ximage = NULL; /* MF004 BEGIN */
/* GetCachedXImage --
*/
static XImage *
GetCachedXImage (w, pixmap, width, height)
GtermWidget w;
Pixmap pixmap;
int width;
int height;
{
if ((cached_ximage != NULL)) {
if ((pixmap == w->gterm.pixmap) &&
(width == w->core.width) &&
(height == w->core.height)) {
return (cached_ximage);
}
}
return(NULL);
}
/* DestroyCachedXImage --
*/
static void
DestroyCachedXImage ()
{
if (cached_ximage != NULL) {
XDestroyImage (cached_ximage);
cached_ximage = NULL;
}
}
/* NewCachedXImage --
*/
static void
NewCachedXImage (w, xin, pixmap, width, height)
GtermWidget w;
XImage *xin;
Pixmap pixmap;
int width;
int height;
{
if ((pixmap == w->gterm.pixmap) &&
(width == w->core.width) &&
(height == w->core.height)) {
DestroyCachedXImage();
cached_ximage = xin;
}
} /* MF004 END */
|