summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authormaxwelb <maxwelb@google.com>2017-07-10 13:33:40 -0700
committerEric Erfanian <erfanian@google.com>2017-07-10 13:36:47 -0700
commit9ef68bd518def395a5b9cbc8b8d4646c9d27e8d6 (patch)
tree67496cf4485559ded1a2b4b0c158380be0858656 /assets
parent503b8f44e36ca00b9b5797f637023b9f743dc9dd (diff)
Remove letter tile's manual asset caching
In b/63143138 we discovered an issue with the LetterTileDrawable code. The class has static fields that are shared across both the main and background threads, which aren't threadsafe. We attempted to make the code threadsafe in cl/160696979, but that ended up causing issues as well. This CL takes a different approach. Rather than trying to make the code threadsafe, it instead removes the shared fields and makes them final and initialized in the constructor. This is inherently threadsafe since threads cannot interact with the object until it is constructed. Now that the objects aren't shared, we would potentially use more memory, since each LetterTileDrawable will now hold onto an instance of the formally shared object. This was not determined to be an issue in practice, see the data and conclusion in (go/lettertiledrawable-caching). Bug: 63143138 Test: LetterTileDrawableTest (can't verify everything :/ ) PiperOrigin-RevId: 161432711 Change-Id: I443bef01ffac405f5e14e9d981ce1d5a8f3f8fec
Diffstat (limited to 'assets')
0 files changed, 0 insertions, 0 deletions