OSDN Git Service

Removed call to setWillNotCacheDrawing and deprecated it as well as
authorNader Jawad <njawad@google.com>
Thu, 5 Apr 2018 23:34:47 +0000 (16:34 -0700)
committerNader Jawad <njawad@google.com>
Thu, 5 Apr 2018 23:47:21 +0000 (16:47 -0700)
commit2ac86880d6888b0508cdb7d6b2f22a1329a66560
treee50c35d500069964d0abf2544e268fac6ac9a22f
parent70944c1c72a87276b625201d1b646aeaaefcd008
Removed call to setWillNotCacheDrawing and deprecated it as well as
willNotCacheDrawing as intermediate caching layers are obsolete since
hardware accelerated rendering was introduced in API 11

ImageView's current implementation of setScaleType would manually
disable it's cache if the ScaleType provided was CENTER. This was end up
not drawing the ImageView if View.LAYER_TYPE_SOFTWARE was configured on
the ImageView as the cache no longer existed. Removed the logic to
conditionally disable the drawing cache and marked
setWillNotCacheDrawing/willNotCacheDrawing as hardware accelerated
rendering makes these facilities obsolete

Fixes: 77653694
Fixes: 72139649
Test: Created a test application with an ImageView and manually set a
ScaleType of CENTER and forced the ImageView to render in a software
layer to confirm that it would render properly with a drawable of the
test application's launcher icon

Change-Id: Ie73b1e0708a265e3cc2cc74ed13539f4219dbd7d
api/current.txt
core/java/android/view/View.java
core/java/android/widget/ImageView.java