save/load the pixel in the cache
Dana Jansens danakj@orodu.net
1 files changed,
2 insertions(+),
1 deletions(-)
jump to
M
otk/rendercolor.cc
→
otk/rendercolor.cc
@@ -54,6 +54,7 @@ CacheItem *item = _cache[_screen][color];
if (item) { _gc = item->gc; + _pixel = item->pixel; ++item->count; } else { XGCValues gcv;@@ -81,7 +82,7 @@ GCForeground | GCCapStyle, &gcv);
assert(_gc); // insert into the cache - item = new CacheItem(_gc); + item = new CacheItem(_gc, _pixel); _cache[_screen][color] = item; ++item->count; }