Skip to content

Commit

Permalink
start on caching
Browse files Browse the repository at this point in the history
  • Loading branch information
tballmsft committed Dec 5, 2024
1 parent 7c04d0d commit 2842b34
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions libs/screen/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -870,8 +870,11 @@ bool overlapsWith(Image_ img, Image_ other, int x, int y) {
// words byte 4...N: data 1 bit per pixels, high order bit printed first, lines aligned to byte

Image_ convertAndWrap(Buffer buf) {
if (isValidImage(buf))
return NEW_GC(RefImage, buf);
if (isValidImage(buf)) {
auto r = NEW_GC(RefImage, buf);
r.makeWritable();
return r;
}

// What follows in this function is mostly dead code, except if people construct image buffers
// by hand. Probably safe to remove in a year (middle of 2020) or so. When removing, also remove
Expand Down

0 comments on commit 2842b34

Please sign in to comment.