17 Commits

Author SHA1 Message Date
Adlai Holler
c3ae4474d0
NoCopyRendering experiment: Fix possible memory leak if image node rendering is canceled #trivial (#765)
* Fix memory leak if image node rendering is canceled

* Update comment
2018-01-23 10:45:34 -08:00
Adlai Holler
1d105c2056
Add an experimental "no-copy" renderer (#741)
* Add "ASGraphicsContext" to skip copying our rendered images

* Zero the buffer before making a context

* Update license header

* Update dangerfile

* Make it a runtime flag

* Restore GState for good measure

* Free buffer if end without image

* Enable the experiment, and cut out the middle-man

* Fix typo
2018-01-13 19:19:08 -08:00
Adlai Holler
ff608c92bf
[Minor Breaking API] Make deallocation queues more reliable (#651)
* Make our async deallocation functions take a double pointer, so we can be sure we've released before the queue drains

* Make it a class property

* Fix the return type

* Use a locker

* Improve release notes
2017-11-02 10:45:34 -07:00
Huy Nguyen
8e0aa1ea73 Fix crashes caused by failing to unlock or destroy a static mutex while the app is being terminated (#577)
* Fix crashes caused by failing to unlock or destroy a static mutex while the app is being terminated

* Allocate static mutexes on the heap memory to avoid destruction at app exit

* ASThread to use ASDisplayNodeCAssert() instead of assert()
2017-09-22 11:53:41 +01:00
Huy Nguyen
9df6909d71 [ASImageNode] Always dealloc images in a background queue (#561)
* ASImageNode to always dealloc its images in a background queue

* Update CHANGELOG
2017-09-11 13:33:30 -07:00
appleguy
65fabf49d7 [ASImageNode] Enable .clipsToBounds by default (fix .cornerRadius, GIFs overflow). (#466)
* [ASImageNode] Enable .clipsToBounds by default (fix .cornerRadius, GIFs overflow).

We've seen a number of bugs reported over time that .cornerRadius didn't work on
ASNetworkImageNode. This wasn't much of a concern because cornerRadius is very
inefficient anyway, and there are better ways to round corners, but it should
certainly work.

It turns out that clipsToBounds has been off for images, and this ultimately
was behind another issue recently seen wehre decoded GIFs would spill outside
the bounds area to overlap nearby content.

Although there is some risk of behavior change from this, I think the risk
is fairly small, and in most cases it will probably fix behaviors in a way
that doesn't cause problems for the app.

We should consider if this property should be on for all ASDisplayNodes,
but for now it would be a great step to be confident it's on for all
ASImageNodes.

* Update changelog for ImageNode Clipping.
2017-08-20 03:17:46 -07:00
Adlai Holler
d30c35787c Fix Alignment of Hashed Structs (#287)
* Fix alignment of ASImageNodeContentsKey struct to fix hashing

* Change the change log by logging a change

* Add the world's stupidest explicit cast

* Actually its simpler
2017-05-17 18:08:50 -07:00
Michael Schneider
3738f1f6e2 [ASImageNode] Move to class method of displayWithParameters:isCancelled: for drawing (#244)
* Remove instance displayWithParameters:isCancelled:

* Address comments
2017-05-09 13:03:30 -07:00
Michael Schneider
8692428481 [ASDisplayNode] Pass drawParameter in rendering context callbacks (#248)
* Pass drawParameter in rendering context callbacks

* Add changelog

* Fix examples
2017-05-08 14:39:40 -07:00
Michael Schneider
17d956493a [ASImageNode] Move debug label and will- / didDisplayNodeContentWithRenderingContext out of drawing method #trivial (#235)
* Move configuring the debug label from the drawing method in displayDidFinish

* Move will- and didDisplayNodeContentWithRenderingContext in drawing parameters
2017-05-04 16:56:26 -07:00
Michael Schneider
25da46c8ac Remove unneeded pointer star (#231) 2017-05-04 13:41:35 +01:00
Adlai Holler
456dc8535d Simplify Hashing Code (#86)
* Simplify hashing

* Update chingling

* Update license
2017-04-29 15:23:00 -07:00
Garrett Moon
8013e25524 Update license v2 (#67)
* Fixed license

* Update all licenses

* Update Dangerfile for new license

* Update already updated licenses

* Closer…

* Closer…

* Closer…

* Closer…

* Closer…

* Closer…

* Closer…

* Closer…

* Closer…

* Closer…

* Closer…
2017-04-24 16:59:57 -07:00
Huy Nguyen
5ef1d2b541 Improve hash functions of image and text nodes (#3265)
* Improve hash functions of image and text nodes

* Move ASEqualityHashHelpers to Private/
2017-04-13 16:13:21 -07:00
Michael Schneider
1f042e960d [ASNetworkImageNode] Improve locking (#3187)
* Locking improvements for ASNetworkImageNode

* Fix typo

* Address comments

* Address comments

* Change comment to kick build
2017-03-28 10:42:59 +01:00
Michael Schneider
0540c863ca Improve locking situation in ASDisplayNode subclasses (#3159)
* Improve locking situation in ASDisplayNode subclasses

* Adress first number of comments

* Don’t hold the lock while calling _updateComposedTruncationText
2017-03-10 17:29:09 +00:00
Adlai Holler
73ca6ab514 Shuffle & Cleanup Stuff (#3080) 2017-02-26 18:14:13 -08:00