summaryrefslogtreecommitdiff
path: root/libs
AgeCommit message (Collapse)AuthorFilesLines
2017-01-03Fix idmap leak in zygote processneo.chae1-0/+1
Fix a idmap leak in AssetManager::addSystemOverlays. And, The fix could also prevent fd leak of idmap. Test: none Bug: 32691930 Signed-off-by: Hyangseok Chae <neo.chae@lge.com> (cherry picked from commit 6a742a38509693f8b39ee9a5ad2803fca12688bf) Change-Id: Idc4af77db2b0cb739bd6b009b6af0f9123be1aac (cherry picked from commit 0244ca8d10dfc27e14f481fe649b89f7638c48eb)
2016-10-18Fix race with Asset destruction and printing allocation statsAdam Lesinski3-36/+94
A race could occur when printing the list of Asset allocations for debugging purposes. Each Asset object would insert themselves into a global linked list on construction and remove themselves on destruction. Iterating the list and the insertion/remove operations all acquire a global lock. The race occurs after the Asset subclass destructor runs but before the Asset base class destructor runs, which performs the actual removal from the list. The vtable of the object being destroyed ends up pointing at the base Asset class' vtable, and during the iteration of the global list, a pure virtual method is called leading to an abort, since the wrong vtable is dereferenced. This change moves the insertion/removal of the Asset object into the global list to the concrete class, which adds some maintenance overhead but solves the problem. Bug:31113965 Test: make libandroidfw_tests Change-Id: I1a620897e5e04a8519ee247883bba0719b1fa6f3 (cherry picked from commit 0358efe4f76f42d9eea91600202a5ab0831d9cef)
2016-10-17Fix complex clipping on mergeable ops DO NOT MERGEChris Craik2-1/+30
Fixes: 32106003 Change-Id: I519bc38a1fa8c25c9ae317ffdb7e59e5a0824f59
2016-10-12Merge "RRO: Synchronize access to overlays.list" into nyc-mr1-devAdam Lesinski1-0/+13
2016-10-12RRO: Synchronize access to overlays.listMartin Wallgren1-0/+13
idmap --scan is executed as a part of the pre-loading in ZygoteInit. The pre loading is executed in parallel for each supported architecture (32/64 bit). This will cause a race condition in the creation of the overlays.list file and the idmap files for the system overlays. Apply flock on overlays.list to prevent the file from being thrown away and recreated when it is in use by another Zygote. Cherry-picked from AOSP. Bug: 28032298 Test: manual Change-Id: I51d39f121d207b11181340b68b164b60020f0c61
2016-10-12Fix SkShader leak for Gradient VectorDrawable and testDoris Liu2-2/+50
This CL fixes a SkShader leak in VD when applying local matrix to the shader. Specifically, the usage of newWithLocalMatrix(...) increments the shader's ref count in every draw() call for Gradient VectorDrawable, whereas there's no balancing call to decrement the ref count in draw(). In this CL, we assume the ownership of the shader returned from newWithLocalMatrix(...) to ensure the correct ref count management. Also, add test to verify that shader is no longer being leaked BUG: 32067647 Test: this CL Change-Id: Ic15fe46cde06a73d81b44e2d3c56b51907344cc0
2016-10-10Turn off additional logging in text renderingsergeyv1-1/+1
Change-Id: If5f11489c05e320e4436fb57680857b29228a755 b:30427106
2016-10-08Support calling start() in onAnimationFinished(...) in AVDDoris Liu1-1/+10
This CL fixed an issue where calling start() from onAnimationFinished() caused AnimationListenerBridge::onAnimationFinished(...) to be unsafely re-entered and the new start listener was (incorrectly) reset to null. BUG: 31971397 Test: test apk in the bug linked above Change-Id: Ica809ef2dab884950b93b54f2d0cb4b81e9830f1
2016-10-04Make umbra lighter when the blocker is too high and has no real umbra area.Teng-Hui Zhu1-3/+7
b/31939390 Test: CTS testShadowLayout && Manual FrameworkShadow test Change-Id: Ib0b6c4239ac8a521a827be246e912daf2ad3b885
2016-10-03Fix thread race caused double free issue.songjinshi1-1/+2
The SharedZip's Asset is not thread-safety,the getResourceTableAsset() and setResourceTableAsset(Asset* asset) function of the SharedZip is not sync with a same lock. Consider the following sequence of events: Thread A calls setResourceTableAsset(Asset* asset),it will set mResourceTableAsset = asset; then to calls getBuffer() of the asset. Thread B calls getResourceTableAsset(),which return mResourceTableAsset, then to calls getBuffer() of the mResourceTableAsset,the asset and mResourceTableAsset is same one object. Thread A to delete mZipInflater in getBuffer(). Thread B to delete mZipInflater in getBuffer(). It will cause crash becuase double delete mZipInflater in getBuffer(). https://code.google.com/p/android/issues/detail?id=211941 Bug:31734545 Change-Id: I5a7d67fdf64c4aa03f505b37a2fa840f4443d158 Signed-off-by: songjinshi <songjinshi@xiaomi.com>
2016-09-14Ignore HasAlphaLayer flag to fix b/30929229Yuqian Li1-3/+4
BUG:30929229 Change-Id: Iebadc6b3d224efa0554cbbb99ea43f871c28722b
2016-09-13Merge changes Ic26b25e7,I653571d6 into nyc-mr1-devSergei Vasilinetc11-16/+303
* changes: HWUI: track upload & recent usage in font cache HWUI: calculate used memory in FontCache for gfxinfo
2016-09-12HWUI: track upload & recent usage in font cachesergeyv8-1/+215
FontCacheHistoryTracker should be turned off before shipping: b/31438876 bug:30427106 Change-Id: Ic26b25e790d4ee69e484ca0cb23dc9cc522b2ed3
2016-09-09Merge "Hold a weak reference to PointerController when handling vsync" into ↵TreeHugger Robot2-1/+26
nyc-mr1-dev
2016-09-09Hold a weak reference to PointerController when handling vsyncVladislav Kaznacheev2-1/+26
Currently PointerController starts listening to display events immediately (in its constructor) and never explicitly removes the callback. The reference dangling from the looper prevents the PointerController instance from being deleted when all the clients have released their references. As a result, when USB or BT mouse is disconnected, the mouse stays frozen on screen and only goes away after a 15 sec inactivity timeout. This change introduces an intermediary LooperCallback which holds only a weak reference to PointerController. The pointer now disappears immediately upon mouse disconnect. Bug: 30824220 Change-Id: I5f7208dbfa381b3e21f248cc0da402f307faa184
2016-09-08HWUI: calculate used memory in FontCache for gfxinfosergeyv6-15/+88
bug:30427106 Change-Id: I653571d6a4e974e975fb0dc03fc2364eecbf2f84
2016-09-02Merge "Fix EGLImage memory leak" into nyc-mr1-devJohn Reck1-2/+10
2016-09-01Fix EGLImage memory leakJohn Reck1-2/+10
Bug: 31247709 Change-Id: I9e36206b0d7bdb75b84cd53b70f7746ca34a3469
2016-08-31Wait on frame work fences when frames are droppedChris Craik3-2/+8
bug:30895941 Prevents a race where frame work could interleave between frames, causing SurfaceView position updates to be delivered out of order. Change-Id: I01e4cc557b69dcf33e877a0e16c0d115ec95e4cc
2016-08-09Make updateSurface non-blockingJohn Reck1-1/+1
Bug: 30442298 We already do this for initialize(), fix it so that update() is parallel with the UI thread as well. Shaves ~7ms off of the 99th percentile on NotificationShade open & close Change-Id: I1791df495453fb9e1e12362c68e3d20e837e62be
2016-08-08Merge "Prevent EndLayerOps when Begin was rejected" into nyc-mr1-devChris Craik3-35/+53
2016-08-08Prevent EndLayerOps when Begin was rejectedChris Craik3-35/+53
bug:30537130 BeginLayerOps were being rejected in a way that allowed the associated EndLayerOps to still be recorded. This was a violation of DisplayList content expectations, and caused crashes in FrameBuilder when trying to play these DisplayLists back. Change-Id: I531b840aa5c4ffb1ee458da3f4b366978eaeafbe
2016-08-08Fix infinite AVD not runningDoris Liu1-1/+1
This CL fixed an integer overflow error caused by using integer literal when it should be a float literal that defines a double. BUG:30739855 Change-Id: If2bdb0eb7a2e93d28434bfe72ec11e8f1f2a1eda
2016-08-08Merge "Ensure Dequeue/Queue duration is always set" into nyc-mr1-devJohn Reck1-0/+3
2016-08-06Merge "Remove animation value change from push staging" into nyc-mr1-devDoris Liu3-8/+28
2016-08-05Ensure Dequeue/Queue duration is always setJohn Reck1-0/+3
Bug: 30662749 Change-Id: I35a4c26ce78536fc7a506ec2f92a8b9eecb12ec2
2016-08-05Support repeatMode = reverse in AVDDoris Liu3-26/+50
BUG: 30641232 Change-Id: I34c823a0a45c8441873a9b467275174c5529994b
2016-08-04Remove animation value change from push stagingDoris Liu3-8/+28
This CL ensures that animation values are only updated during animation pulses. This CL also includes the revert of https://googleplex-android-review.git.corp.google.com/#/c/1285913/ BUG: 30659748 Change-Id: Iadc84462dc61157efd3c18a23767bba9faf00f6e
2016-08-03Fix RNA crashJohn Reck1-2/+5
Bug: 30632377 Change-Id: I5d53fba0f469553ae90bebad1482ef28965dd853
2016-08-02Merge "Ensure layer update include the dirty rect from AVD" into nyc-mr1-devDoris Liu1-1/+1
2016-08-02Merge "Put VD animators on paused list when RT stops drawing" into nyc-mr1-devDoris Liu2-2/+2
2016-08-02Fix FrameMetricsObserver crashJohn Reck2-0/+4
Bug: 30587465 Someday maybe the technology will exist to allow sharing a simple constant between Java and C++, but today is not that day. Change-Id: I17694746cb8712058133cd5ea10c47b9909f740b
2016-08-02Ensure layer update include the dirty rect from AVDDoris Liu1-1/+1
BUG: 30166063 Change-Id: Ia14a2fe3c653e0172a28b4ef22f5171ccf7390c1
2016-08-02Merge "Eliminate recents upload jank" into nyc-mr1-devTreeHugger Robot4-0/+51
2016-08-01Eliminate recents upload jankJohn Reck4-0/+51
Bug: 30342017 Upload recents thumbnails in the dead gaps between frames instead of at the start of a frame. This eliminates jank caused by the large texture upload. Change-Id: I507cd286d199109c7a9a1511d68ba5ab5d28069f
2016-08-01Fix null deref crashJohn Reck1-5/+10
Bug: 30560152 Change-Id: Ic4bae380e27de5bea80cec484e83d205e078ec43
2016-08-01Put VD animators on paused list when RT stops drawingDoris Liu2-2/+2
When we stop scheduling for new frames on RenderThread, we should put the running animations on pause, rather than purge the list of the running animations, such that in the next full sync, the animations that were paused will continue to run. BUG: 30226711 Change-Id: I36ff6f5d26ffa7999f60ca0ff676a35157577dc2
2016-07-29Merge "Teach JankTracker about new swap behaviors" into nyc-mr1-devTreeHugger Robot8-9/+73
2016-07-29Teach JankTracker about new swap behaviorsJohn Reck8-9/+73
Bug: 30440166 If we are using HWC2, there's a change in timing when in triple buffering with the pipelined offsets. This changes JankTracker to recognize that and silently erase that from the total duration Change-Id: Ib1fd4209070f17dbd2baed707c8cf73fb11c3cf2
2016-07-28Merge "Drop less aggressively" into nyc-mr1-devJohn Reck1-4/+6
2016-07-27Drop less aggressivelyJohn Reck1-4/+6
Bug: 30342762 Frame dropping was too frequent and would trigger during normal triple buffering steady state. Bump the threshold to drop from 3ms stall to 6ms stall. Change-Id: I5c1faeaabf0d02323a28e697a4af4105fbcf1c53
2016-07-27Merge "Run animation *after* property sync" into nyc-mr1-devDoris Liu1-0/+1
2016-07-27Merge "Reject fully transparent paint-fill ops at record time" into nyc-mr1-devChris Craik3-4/+40
2016-07-26Reject fully transparent paint-fill ops at record timeChris Craik3-4/+40
bug:30342762 Avoids unnecessary work for each transparent operation. Change-Id: I80b1eeca34ae32249433fde55e9fe93d02c411db
2016-07-26Run animation *after* property syncDoris Liu1-0/+1
VectorDrawable contains properties that can be mofidied from both UI thread and RenderThread. The two sets of properties are synced during prepareTree. Previously VD animations ran before prepareTree, as a result, during prepareTree the property sync overwrote some of the animatable properties. In other words, the first frame of the animation wasn't correct. An example is in battery saver mode when the animation only has one frame to animate (0-duration), the end result looked wrong. This CL moves the VD animation to after prepareTree to solve the problem mentioned above. Meanwhile, in order to signal which VD will be animated so as to have them properly damaged, all VDs with running animators are marked dirty. Bug: 30226711 Change-Id: I831dae9abb2908876c935b9be4c11dfd09452d5c
2016-07-21Merge "Change swap chain stuffed detection logic" into nyc-mr1-devChris Craik2-5/+13
2016-07-20Change swap chain stuffed detection logicChris Craik2-5/+13
bug:29771461 bug:29413700 bug:30181577 Changes frame interval gap detection to look for wider gaps, as they were incorrectly firing all the time. Also adds a 500ms minimum gap between frames dropped because of stuffed swap chain, to prevent dropping too often. Change-Id: If16ed637d54bf37015704be102c5c2e3731a0824
2016-07-20Merge "Rename color transform to color mode and persist the value." into ↵TreeHugger Robot1-1/+0
nyc-mr1-dev
2016-07-18add tracepoint for when the display chain is stuffedTim Murray1-0/+1
bug 30173296 Change-Id: I7845542d4e5c19ccb7c3ee6498cc2d70278b5397
2016-07-18Rename color transform to color mode and persist the value.Michael Wright1-1/+0
Also, standardize on a set of possible modes for the displays to enter and separate the configuration of the color mode from the configuration of the display mode. Bug: 29044347 Change-Id: I6af0a7d1f11bc72d4cefc380f115c1fb00788864