frameworks/base/libs/androidfw/ResourceTypes.cpp:742:46: warning: Result
of 'calloc' is converted to a pointer of type 'char16_t *', which is
incompatible with sizeof operand type 'char16_t **'
mCache = (char16_t**)calloc(mHeader->stringCount,
sizeof(char16_t**));
frameworks/base/libs/androidfw/ResourceTypes.cpp:4359:28: warning:
Potential leak of memory pointed to by 'set'
return NO_MEMORY;
Bug: None
Test: Builds without the aforementioned warnings.
Change-Id: I1f84c1b9f4cba05f5cc7c3ae9fec1a07bc9cd8fe
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.
Bug: 28032298
Change-Id: I51d39f121d207b11181340b68b164b60020f0c61
Bug: 29628138
1: Make windowPositionLost synchronous as that's
what the Java side was expecting
2: Make the listener ref counted as otherwise
there's a race condition with the GC, which could
end up with use-after-frees
3: Ensure that all position updates are invoked
prior to frame completion
Change-Id: Iedbc017f611ba2878a49b4586612f79249ca2fe3
(cherry picked from commit 7b570deea65bc7ac417a26ce3e4103bcef30e957)
The maximum length of a system property is 31 bytes.
debug.hwui.enable_partial_updates is 33 bytes
Change-Id: Idb1b1a00294dd29f84530e8aee1f685094d0096f
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
Change-Id: I5a7d67fdf64c4aa03f505b37a2fa840f4443d158
Signed-off-by: songjinshi <songjinshi@xiaomi.com>
HWUI calculates the texture size as w*h*bpp. In some cases, the
calculated path cache is small, but the actual memory allocated
in driver is 4k/8k/16k, much bigger than HWUI calculates.
Example: a 5*65 alpha texture, HWUI think it is 5*65*1 = 325 bytes,
but driver allocates 8K. An app can allocates up to 32M path textures,
which actually consumes 32M*(8*1024/325) = 806M memory.
Here we limit the number of path texture in the cache to 256, it
should be a pretty generous global limit.
Change-Id: I890819b73bb0b7f63e96bc3d9d0ff9469c16838c
On some cases (noticed from log) that there is a crash in
libhwui.so, future debug log shows that the light center position
values are nan, causing an out of bound access in hull function
in SpotShadow.cpp for parameter retPoly which assume to be of
maximum length of pointsLength only but not the case when all
points are nan.
More log shows that a Snapshot was created (new) without
mRelativeLightCenter begin set, and Layer.cpp trying to
use it by calling updateLightPosFromRenderer. Those values
are random values in stack which causing math calc based on
that value returning nan also.
Initialize mRelativeLightCenter to 0 in Snapshot.cpp to avoid the
problem.
Change-Id: I9e24f6f1f856d053d09db1b1aae100f219f2a6de
fixes: 29771171
This is a regression from HWUI_NEW_OPS, a roundOut
was missing in the new path that was in the old one
Change-Id: Ibf223d550bb5525781864dd9b7f7cd6d73adb98b
Fixes: 29072773
By using computeFrameTime AnimationContext would
potentially end up modifying the latest vsync if
a very-slow frame was received from the UI thread.
This could potentially desync animations that were
RT & UI thread 'synchronized', but more significantly
it would confuse the swap chain which tries to only
draw one frame per vsync causing unneccessary frame
drops.
Change-Id: Ibd2ec3157ce32fee1eec8d56837c45a35e622895
My logcat is packed with these dispatcher vsync pulse messages
that really don't seem to be describing an error case (though
maybe I'm wrong?).
So quiet it down a bit and set the loglevel to verbose.
Change-Id: Ic4359f64f9cecfc1ffe49275f5f63327ba1b6f1d
Signed-off-by: John Stutlz <john.stultz@linaro.org>
This allows WebView to add itself to the ResourcesManager and
remain their even after configuration changes and multi-window
changes.
Bug:29112218
Change-Id: I2cb131ae2c61fb58c48babafdd46c1882be96aa9
Align x offset and width to 32, y offset and height to 4.
It improves the font texture upload performance.
Change-Id: I967eeed90658f2ce1eb08cb2740d5dc34c72f40b