added lessc, reimplemented mica caching

This commit is contained in:
booploops 2022-06-29 14:11:21 -07:00
parent b97dd15f5d
commit fa2c36b6ed
6 changed files with 18184 additions and 20 deletions

View file

@ -21,22 +21,22 @@ async function spawnMica() {
let lastScreenWidth;
let lastScreenHeight;
let regen = true;
let imgSrc = await ipcRenderer.sendSync("get-wallpaper", {
let imgSrc = "";
let micaCache = await CiderCache.getCache("mica-cache");
if (!micaCache) {
micaCache = {
path: "",
data: "",
};
}
if (micaCache.path == imgSrc.path) {
imgSrc = micaCache;
}else{
imgSrc = await ipcRenderer.sendSync("get-wallpaper", {
blurAmount: 256
});
// let micaCache = await CiderCache.getCache("mica-cache");
// if (!micaCache) {
// micaCache = {
// path: "",
// data: "",
// };
// }
// if (micaCache.path == imgSrc.path) {
// regen = false;
// imgSrc = micaCache;
// }
});
CiderCache.putCache("mica-cache", imgSrc);
}
let canvas = document.createElement("canvas");
let ctx = canvas.getContext("2d");
let img = new Image();