prctl(PR_SET_NAME) limits to 15 characters. Before we had names like
"Binder Thread #" and the counter was cut off :-( Also remove redundant
"thread" at end of name; it's always a thread.
Change-Id: I1f99c2730ba0787ed9b59c15914356cddf698e2f
MemoryHeapPmem is not used any longer. PMEM is not a supported
type of memory by the system anymore. a particular device might
use PMEM and need something like MemoryHeapPmem, in this case this
should be implemented in device specific code (HAL).
This will most likely break older no longer supported targets.
Change-Id: I434e4291219950018de8b793b0403bb2d92dd5cc
1. Use "%zu" instead of "%d" for size_t in printf
2. Variable precision specifier (eg. "%.*s") in printf should be of type int.
(iov_len is size_t which is 64-bit when compiled with -m64)
3. Use PRId64 instead of "%lld" to print variables of type int64_t
Change-Id: I2be40a6514b5dffa0038d62b9bccc3401b8756e6
Refactored SurfaceTexture and BufferQueue such that share
no protected members. Created an consumer facing interface
for BufferQueue in preparation of connecting SurfaceTexture
and BufferQueue through a binder.
Change-Id: I938e63e085128148c58d0e26c7213b30145c109f
re-add support for pixelformats L_8, LA_88 and RGB_332 in libui
for backward compatibility.
This may or may not fix 6058926
Bug: 6049685
Change-Id: Ic1b8b4cc994522f7fe664da64c0ef76b98bc6d53
Refactored SurfaceTexture and BufferQueue such that share
no protected members. Created an consumer facing interface
for BufferQueue in preparation of connecting SurfaceTexture
and BufferQueue through a binder.
Change-Id: Iff55e740e36a7f70c9f7a17ee7a5af38e3d21f0f
This does not actually change the framebuffer format. It merely
fakes this format to surfaceflinger so that when it creates
framebuffer surfaces it will use this format. It's really a giant
HACK to allow interworking with buggy gralloc+GPU driver
implementations. You should *NEVER* need to set this for shipping
devices.
Change-Id: I03eeb5b4d72838ef219df386ecc489fc20ab9cc7
Signed-off-by: Dima Zavin <dima@android.com>
Instead of sending finished signals immediately when appending to
a batch, record the chain of sequence numbers that were part of
the batch and then send finished signals all at once when done.
This change helps the dispatcher keep track of the true state
of the application and can improve ANR detection slightly.
This is part of a series of changes to improve input system pipelining.
Bug: 5963420
Change-Id: I463c2221e2aa8fdf1c3d670c18e39e59ab69b0db
To support this feature, the input dispatcher now allows input
events to be acknowledged out-of-order. As a result, the
consumer can choose to defer handling an input event from one
device (because it is building a big batch) while continuing
to handle input events from other devices.
The InputEventReceiver now sends a notification when a batch
is pending. The ViewRoot handles this notification by scheduling
a draw on the next sync. When the draw happens, the InputEventReceiver
is instructed to consume all pending batched input events, the
input event queue is fully processed (as much as possible),
and then the ViewRoot performs traversals as usual.
With these changes in place, the input dispatch latency is
consistently less than one frame as long as the application itself
isn't stalled. Input events are delivered to the application
as soon as possible and are handled as soon as possible. In practice,
it is no longer possible for an application to build up a huge
backlog of touch events.
This is part of a series of changes to improve input system pipelining.
Bug: 5963420
Change-Id: I42c01117eca78f12d66d49a736c1c122346ccd1d
This change enables the input dispatcher to send multiple touch
events to an application without waiting for them to be acknowledged.
Essentially this is a variation on the old streaming optimization
but it is much more comprehensive. Event dispatch will stall as
soon as 0.5sec of unacknowledged events are accumulated or a
focused event (such as a key event) needs to be delivered.
Streaming input events makes a tremendous difference in application
performance. The next step will be to enable batching of input
events on the client side once again.
This is part of a series of changes to improve input system pipelining.
Bug: 5963420
Change-Id: I025df90c06165d719fcca7f63eed322a5cce4a78
Since we will not longer be modifying events in place, we don't need
to use an ashmem region for input. Simplified the code to instead
use a socket of type SOCK_SEQPACKET.
This is part of a series of changes to improve input system pipelining.
Bug: 5963420
Change-Id: I05909075ed8b61b93900913e44c6db84857340d8
Services now must explicitly opt in to being accessed by isolated
processes. Currently only the activity manager and surface flinger
allow this. Activity manager is needed so that we can actually
bring up the process; SurfaceFlinger is needed to be able to get the
display information for creating the Configuration. The SurfaceFlinger
should be safe because the app doesn't have access to the window
manager so can't actually get a surface to do anything with.
The activity manager now protects most of its entry points against
isolated processes.
Change-Id: I0dad8cb2c873575c4c7659c3c2a7eda8e98f46b0
This adds basic support for clip regions. It is currently disabled at compile
time. Enabling clip regions will require setting up a stencil buffer.
Change-Id: I638616a972276e38737f8ac0633692c3845eaa74
Switching activity stacks
Cache ContentProvider per user
Long-press power to switch users (on phone)
Added ServiceMap for separating services by user
Launch PendingIntents on the correct user's uid
Fix task switching from Recents list
AppWidgetService is mostly working.
Commands added to pm and am to allow creating and switching profiles.
Change-Id: I15810e8cfbe50a04bd3323a7ef5a8ff4230870ed
with this changes, SF transactions are handled as soon as possible
but do not trigger updates. the update is delayed until the next
vsync.
this allows us to work much better without requiring triple-buffering.
Change-Id: I1fa10794d0cf742129f0877698b7b1e1f2ec7401
In our current environment with very many translations, this can
save a lot of RAM -- for example over 200K in Gmail just by sorting
the strings in the Gmail .apk (not the framework).
Also add a new aapt command to print the contents of the resource
table string pool.
Change-Id: I1da037b3e2c377b890833ff57ab158965314ac48
This change enables the use of the EGL_KHR_fence_sync extension in
SurfaceTexture on omap4 and s5pc110 platforms.
Change-Id: Icad5245bab445413ffb8a7c823c296b678bf3250
This is needed when the parent or any other thread besides the child
needs access to the child's kernel tid.
Change-Id: Ib148505913eb78314cfd76657c30d7b20663dffd
Several source files privately defined macros LIKELY and UNLIKELY in terms
of __builtin_expect. But <cutils/compiler.h> already has CC_LIKELY and
CC_UNLIKELY which are intended for this purpose. So rename the private
uses to use the standard names.
In addition, AudioFlinger was relying on the macro expanding to extra ( ).
Change-Id: I2494e087a0c0cac0ac998335f5e9c8ad02955873
Currently, madvise(MADV_REMOVE) is called after deallocation.
Another thread might allocate (and even write) the same region between
deallocation and madvise(), in which case the new thread will fail to read
what it have written. So, call deallocate() after madvise(MADV_REMOVE).
Bug: 5654596
Change-Id: I26f36cd6013de499090768a0ddc68206a4a68219
- add the ability to set the vsync delivery rate, when the rate is
set to N>1 (ie: receive every N vsync), SF process' is woken up for
all of vsync, but clients only see the every N events.
- add the concept of one-shot vsync events, with a call-back
to request the next one. currently the call-back is a binder IPC.
Change-Id: I09f71df0b0ba0d88ed997645e2e2497d553c9a1b
This change adds a compile-time option for SurfaceTexture to use the
EGL_KHR_fence_sync extension to synchronize access to Gralloc buffers.
Bug: 5122031
Change-Id: I7e973a358631fff5308acf377581b811911fe790
use gui/DisplayEvent to receive the events. Events are
dispatched through a unix pipe, so the API is compatible
with utils/Looper. see gui/DisplayEvent.h for more info.
Bug: 1475048
Change-Id: Ia720f64d1b950328b47b22c6a86042e481d35f09
Revert "Add support for sending VSYNC events to the framework"
This reverts commit f3918c5bd4bc9f02f74da42995564150ca2dd382.
Change-Id: I998e3e1aa3fa310829ae973b64fe11b01f6f468f
use gui/DisplayEvent to receive the events. Events are
dispatched through a unix pipe, so the API is compatible
with utils/Looper. see gui/DisplayEvent.h for more info.
Bug: 1475048
Change-Id: If4126023fc9c067e56087ec7d16a8fd542ce1794
The basic hashtable is intended to be used to support a variety
of different datastructures such as map, set, multimap,
multiset, linkedmap, generationcache, etc.
Consequently its interface is fairly primitive.
The basic hashtable supports copy-on-write style functionality
using SharedBuffer.
The change introduces a simple generic function in TypeHelpers for
specifying hash functions. The idea is to add template
specializations of hash_type<T> next to the relevant data structures
such as String8, String16, sp<T>, etc.
Change-Id: I2c479229e9d4527b4fbfe3b8b04776a2fd32c973
* commit 'c25972950c2ea62fb085524dbe737c2bf0f08f4a':
SurfaceTexture: fix a couple tests
EGL: default to swap interval 1
SurfaceTexture: clean up some tests
This change fixes some robustness issues with the
EglDestroySurfaceUnrefsBuffers and
EglDestroySurfaceAfterAbandonUnrefsBuffers tests. The tests previously
depended upon GL implementation details that should not have been relied
upon.
Change-Id: I37fd43b56568efe1dbe69d85e892be8a1cf44d20
This change explicitly sets swap interval 1 on the window when an
EGLSurface is created to render to it.
Change-Id: I91eb29dbee3ae4a55076b921f084d503fbe94e03
This change cleans a few things up in the SurfaceTexture tests:
- Wraps a few long lines.
- Refactors the multithreading portions of SurfaceTextureGLToGLTest into
a new test fixture called SurfaceTextureGLThreadToGLTest.
- Changes some of the tests that were creating their own EGLSurface to
use the SurfaceTextureGLToGLTest fixture.
- Reorders the test functions so that they are immediately below to the
test fixture that they use.
Change-Id: I0491ce3528a7ff2b4f1e83602ba290269c087297
this happens often with CPU Surfaces, which disconnect long
after their surfacetexture has been abandoned.
Change-Id: If49da03b72f99130e01b2b9bcbd444bb38f7ed4e
this flag should be enabled for all targets, but currently
some have issues with it, so we're turning it on only for
tested targets.
this will hopefully resolve some performance issues.
Bug: 5553562, 5631630
Change-Id: I54c7a9e2068586898ab13e405d95534669260537
the working theory here is that a Surface object has become non-promotable
because it lost its last reference; later Surface::readFromParcel is called
the previous surface is found in the cache, but can't be promoted. this causes
a new Surface object to be created which will promptly try to connect to the
CPU_API -- this in turn will fail because the previous (now dead) surface is
still connected.
To fix this, we make sure to disconnect from the SurfaceTexture when
Surface[TextureClient] is destroyed.
Change-Id: I422234868a05d7b7d283e9d5a85f7ab79e65d8a9
This change fixes an issue involving buffer reallocation and the
ALLOW_DEQUEUE_CURRENT_BUFFER mode in SurfaceTexture. The bug happened
when the buffer slot currently attached to the GL texture was selected
for dequeuing, but the dequeue operation caused the buffer to be
reallocated. Because the buffer is new, the image producer could fill
the buffer and queue it before an updateTexImage call, which would
result in the "slot %d is current" error in queueBuffer.
Bug: 5631630
Change-Id: Icdd8bc5cad3c7db43953446d9be2603aaea11a8d
Stop using system properties to publish information about
the key character map path. Instead, we can retrieve it
on demand by asking the window manager.
It was possible to exhaust the supply of system properties
when repeatedly adding and removing input devices.
Bug: 5532806
Change-Id: Idd361a24ad7db2edc185c8546db7fb05f9c28669
Surface Texture dequeue logic is modified to return the oldest of the
free buffers to Client on dequeue call.
Currently dequeue method is returning the first buffer index which is free.
The parsing is done in ascending order of the buffer slot indices.
This leads to returning the buffer which has been just queued to composer,
and hence display, and this defeats the purpose of having minimum dequeue count
as 2 in asynchrnouse mode.
This is fixed by checking all the free slots and returning the oldest buffer.
Change-Id: Ibbac10593c3994c278c601af0480b171635ecdd4
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>