added lessc, reimplemented mica caching
This commit is contained in:
parent
b97dd15f5d
commit
fa2c36b6ed
6 changed files with 18184 additions and 20 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue