Also add additional compile time checks to ensure that the Java
and Skia APIs remain in sync.
bug:19890753
Change-Id: I8503cacf2859307e3f480a78603f9f05901b58cc
pthread_cond_signal does not need the mutex
to be held to signal. This results in the thread
waking up trying to grab the lock, failing, the signaling
thread to wake up, release the lock, immediately get preempted
for the signaled thread which can now proceed.
Release the mutex before signaling to avoid the ping-pong
scheduling issue, which shaves another 10us off of this
Change-Id: Ie6bccca031ba6528f357eae8352b74626a6318c7
This prevents an issue where if the signal schedules
hwuiTask it will immediately block and go back to sleep due
to mLock still being held.
This costs 10us in thread scheduling ping-ponging bouncing
between hwuiTask and RenderThread
Change-Id: I47595c1bf5736576483a6aa7aada0b1be1e04268
To obtain the gfxinfo for each process, the static method of RenderProxy is used, which is named outputLogBuffer().
In there,
1. RenderTask is created for getting DisplayList Commands in RenderNode.
2. staticPostAndWait() is called
3. RenderThread's instance is created by 'RenderThread::getInstance()' in staticPostAndWait()
In case of the service, they don't use HW Acceleration, so don't need RenderThread.
But, by the process of No.3, RenderThread is created for all process.
As we know, RenderThread never be destroyed while the process is alive.
This patch checks RenderThread instance before the creation of RenderTask.
And, there is no one, just return to prevent the unnecessay creation of it.
Change-Id: I4fe29d83c9ced3e8b67177c0874c5d8ee62e1870
New ShadowTask with the ShadowDescription key that already
exists in the shadow LruCache will leak as it is not being
added.
Fix adds check for the existing key that is common in the hwui
code but missing for the TessellationCache::precacheShadow
function.
Change-Id: I37fd5ec82f8b8da5d1ec0f2ab9fd04c5f8534367
We expect to be able to parse the output of ResTable_config::toString(),
so it should use modified bcp47 (b+en+Latn+US).
Change-Id: I597a1779a1fa5cff171c473e6a0368d93b9c7722
This removes dependence on SkPath ptrs that HWUI does not control
the lifecycle of. This clears up some errors where the paths are
not generated from Java, but rather the Skia test suites.
Cherry-pick of a change that originally landed in master-skia and is
dependent on a skia merge (ag/655422).
Change-Id: I41b9797a2b0af5d6b4ea51891565469d4f1d832d
Rejects any non null-terminated string that a caller asks
ResStringPool::stringAt for, returning NULL instead.
The rationale for returning NULL rather than amending the string to add
a null-terminator is that conformant APK files will have all their
strings null-terminated anyway, and that this is a possible signal of a
malformed package.
Bug: 15288069
Change-Id: I370937b92f2cadf67fbd54203cbc7d1494be969f
Adds checks to 2 malloc() calls to ensure that the finally allocated
buffer size is not vulnerable to integer overflows. Also includes a
sanity check on the upper bound for type_info.numEntries before each
call.
Bug: 15171384
Change-Id: Ifdf0276bcca7e3d93da7c3577b9486d3c03a9d03
Improve behavior when we get a call to draw 0 points.
Replace one ALWAYS_FATAL statements with noop.
Change-Id: I864b7a9633dfa3dc6eefa403beca4cc7ae14074f