Move BaseRenderLayer into browser

This commit is contained in:
Daniel Imms
2019-07-14 12:22:11 -07:00
parent cdefb3e7f2
commit 9830a077c1
10 changed files with 80 additions and 85 deletions
@@ -10,6 +10,7 @@ import { DEFAULT_ANSI_COLORS } from 'browser/ColorManager';
import { LRUMap } from 'browser/renderer/atlas/LRUMap';
import { isFirefox, isSafari } from 'common/Platform';
import { IColor } from 'browser/Types';
import { throwIfFalsy } from 'browser/renderer/RendererUtils';
// In practice we're probably never going to exhaust a texture this large. For debugging purposes,
// however, it can be useful to set this to a really tiny value, to verify that LRU eviction works.
@@ -366,10 +367,3 @@ function clearColor(imageData: ImageData, color: IColor): boolean {
}
return isEmpty;
}
export function throwIfFalsy<T>(value: T | undefined | null): T {
if (!value) {
throw new Error('value must not be falsy');
}
return value;
}