Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upCaching of the Image object in FImage's form drawImage (native) #191
Conversation
nphollon
referenced this pull request
Dec 4, 2015
Closed
Fix image flickering in Graphics.Collage.sprite #456
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
0joshuaolson1
commented
Feb 1, 2016
|
@silverio Is there a more relevant PR elsewhere? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
evancz
May 11, 2016
Member
Sorry for the slow reply. It has been busy times. All the Graphics.* modules have moved to evancz/elm-graphics so it makes sense to retarget stuff like this.
|
Sorry for the slow reply. It has been busy times. All the |
evancz
closed this
May 11, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
rshest commentedMar 10, 2015
The drawing of the "FImage" form (used by e.g. the currently undocumented Graphics.Collage.sprite) currently creates the Image object every time the form is drawn (which effectively loads the image again), making it practically unusable.
A proposal here is to cache the image object as a property of the corresponding form object, first time it is attempted to be drawn.
Another possibility would be to create and cache it earlier, at the stage of the form object creation.
In my opinion, even better long term alternative would be to include something like jcollard's sprite library (https://github.com/jcollard/elm-util) as part of the core (one caveat there being that it's relying on an
element for drawing, as opposed to the "sprite" one that does direct canvas drawing, without DOM intervention).