This change makes GraphicBufferAllocator::free queue a job to another thread to
perform the actual free operation. This prevents potentially slow free
operations from blocking rendering.
Bug: 7675940
Change-Id: Id61099d66bb4c3949d04184e0d7f192ac18076b4
This change makes ConsumerBase::onBuffersReleased hold a reference to all its
gralloc buffers until after the mutex is unlocked. This prevents slow
gralloc::free calls from causing lock contention with rendering threads.
Bug: 7675940
Change-Id: I0ec805d1b612afeeecfffec03f982371d27d93be
ScopedTrace objects were being used in place of ATRACE_NAME because of a
misunderstanding of it's function. Cleared up documentation for usage.
Also explicitly use global namespace for sysprop callback.
Change-Id: I7c248b486b614ccdb841659ca0dcfc644fda670a
This change moves the frame time history tracking code out of Layer and into a
new class called FrameTracker. It also changes the tracking to use signal
timestamps from fences when available for more accurate results.
Change-Id: I323c5f075c58bf86ce363b52af885ad0f6365f2b
in this particular case, this OOB is always harmless
(and that's why it didn't get fixed from MR1), however,
it interfers with valgrind debugging.
Change-Id: Ic977e03287e59c4b124a89146c9023bd0cb540a8
The emulator doesn't support systrace, but we should point that out
at most once per process.
Bug 7436352
Change-Id: I06b2c1ea0df6c02c11cd2496423c337f8d7c62a1
This prevents strong reference cycles when the listener implementation also
holds a strong pointer to the ConsumerBase
Bug: 7425644
Change-Id: I1514b13a32b18d421c902dddebec0765a989c55c
This change fixes a number of small glitches that can occur when
multiple components in the same process are updating surfaces.
One would expect that updates to disjoint sets of surfaces would
not collide but this is not the case. The first component to
close the global transaction causes all pending updates to
be applied, including those that another component might not
have finished setting up if it also had an open transaction
at the same time.
Change-Id: I99345958581abbe0e1e325a5bcba37e8941a313a
This patch adds a hashtable-based LRU cache. This should be
significantly higher performance than the GenerationCache it is intended
to replace. It is a large part of the fix for bug 7271109
TextLayoutCache low-level performance issues.
We added a new method to BasicHashtable to detect when rehashing is
needed, because the internal linked list pointers would get invalidated
by that rehashing.
Also, the hash_type specialized to pointers had a small flaw.
Change-Id: I950c2083f96519777b851dbe157100e0a334caec
This change adds support for displays that are not allowed to display surfaces
with the eSecure flag set. All non-virtual displays are considered secure,
while virtual displays have their secure-ness specified at creation time.
Bug: 7368436
Change-Id: I81ad535d2d1e5a7ff78269017e85b111f0098500
This change adds a transaction flag for WindowManager to indicate that a
transaction is being used to animate windows around the screen. SurfaceFlinger
will not allow more than one of these transactions to be outstanding at a time
to prevent the animation "frames" from being dropped.
Bug: 7353840
Change-Id: I6488a6e0e1ed13d27356d2203c9dc766dc6b1759
This change makes BufferQueue::dequeueBuffer release its mutex before
allocating new buffers. This should alleviate lock contention in
SurfaceFlinger where SF's main thread can get blocked waiting for an allocation
operation to complete.
Bug: 7335075
Change-Id: I1b000539cc616a695afab2e9c68507db69e57b13
error codes are returned in errno, this caused ::waitForwever()
to only wait for 1 second and return improper error code (-1).
needed to help debugging 7316632
Bug: 7316632
Change-Id: Ie144f614a88393393972a3a770c6b4b0581f961a