summaryrefslogtreecommitdiff
path: root/tools/aidl/generate_java.cpp
diff options
context:
space:
mode:
authorGilles Debunne <debunne@google.com>2012-01-27 13:54:00 -0800
committerGilles Debunne <debunne@google.com>2012-01-27 18:39:07 -0800
commit2e37d6292658e5f481e7173f98e95fee28986c49 (patch)
tree91012849ad587d81ad3f8be00a2a65b2f0d31add /tools/aidl/generate_java.cpp
parent566e8baf43a08b1000b8c4c24fb14fe94e46394d (diff)
Remove onPreDrawListeners earlier in TextView
Bug 5556478 Launcher pre-populates its all apps and widget pages with their content, which includes text. The layout calls some onMeasure methods that trigger TextView's registerForPreDraw(), which in turns adds a listener in the ViewTreeObserver. However, some of these pages may never be actually displayed, leaving the listeners in the list since onDraw() is never called. As a result, every frame displayed by launcher is slowned down by this array copy of 6-18 listeners. The problem is not Launcher specific since other applications may use a similar caching mechanism. The solution is to unsubscribe the listener in onPreDraw. The drawback is that several successive calls to registerForPreDraw() will add/remove the some listener object. However, these calls are rare and are relatively cheap since we're just adding the object in and out of an ArrayList which should not need to change its size. Change-Id: Ifb65655a27e302d31a2ad622d18f839aec99689e
Diffstat (limited to 'tools/aidl/generate_java.cpp')
0 files changed, 0 insertions, 0 deletions