mirror of
https://github.com/zero-peak/ZeroOmega.git
synced 2025-02-02 02:58:13 -05:00
Log error when drawing icon once for debugging.
This commit is contained in:
parent
e0d400cc8f
commit
e8ad1a4a4b
@ -29,6 +29,7 @@ Promise.onUnhandledRejectionHandled (promise) ->
|
||||
|
||||
iconCache = {}
|
||||
drawContext = null
|
||||
drawError = null
|
||||
drawIcon = (resultColor, profileColor) ->
|
||||
cacheKey = "omega+#{resultColor ? ''}+#{profileColor}"
|
||||
icon = iconCache[cacheKey]
|
||||
@ -47,7 +48,10 @@ drawIcon = (resultColor, profileColor) ->
|
||||
drawOmega drawContext, profileColor
|
||||
drawContext.setTransform(1, 0, 0, 1, 0, 0)
|
||||
icon[size] = drawContext.getImageData(0, 0, size, size)
|
||||
catch
|
||||
catch e
|
||||
if not drawError?
|
||||
drawError = e
|
||||
Log.error(e)
|
||||
icon = null
|
||||
|
||||
return iconCache[cacheKey] = icon
|
||||
|
Loading…
Reference in New Issue
Block a user