summaryrefslogtreecommitdiffstats
path: root/libs
Commit message (Collapse)AuthorAgeFilesLines
* Utils: Fix a bug in the linear transformation code.John Grossman2012-06-271-3/+6
| | | | | | | | | | | | | | | | Hand merge from ics-aah > Utils: Fix a bug in the linear transformation code. > > Fix a bug where an incorrect result would be computed if you used the > linear transformation code to do a reverse transformation (from B's > domain into A's domain) when the scaler fraction was negative. > > Change-Id: I8e5f109314d235a177ab41f65d3c4cd08cff78be > Signed-off-by: John Grossman <johngro@google.com> Change-Id: Id90e18f685c61c1a89fd91c32adcf01363b3e8f3 Signed-off-by: John Grossman <johngro@google.com>
* am db1597a9: Fix shutdown sequence to avoid SIGSEGV when running am commandJohannes Carlsson2012-06-251-2/+9
|\ | | | | | | | | * commit 'db1597a98958b78dc0d8eced19ae1406382b70d6': Fix shutdown sequence to avoid SIGSEGV when running am command
| * Fix shutdown sequence to avoid SIGSEGV when running am commandJohannes Carlsson2012-06-251-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the app_process is shutting down the main thread will close the binder fd while pool threads are executing an ioctl (in IPCThreadState::stopProcess called by AppRuntime::onStarted in app_main.c). The binder driver will then return all pending calls in ioctl without any error and with a command. One of the threads gets a BR_SPAWN_LOOPER which will create a new thread (the other thread gets a BR_NOOP). This new thread then calls vm->AttachCurrentThread. Usually this results in a log entry with "AndroidRuntime: NOTE: attach of thread 'Binder Thread #3' failed", but sometimes it also causes a SIGSEGV. This depends on the timing between the new thread an the main thread that calls DestroyJavaVM (in AndroidRuntime::start). If IPCThreadState.cpp is compiled with "#define LOG_NDEBUG 0" the pool thread will loop and hit the ALOG_ASSERT(mProcess->mDriverFD >= 0) in IPCThreadState::talkWithDriver. Crashes like this has been seen when running the am command and other commands that use the app_process. This fix makes sure that any command that is received when the driver fd is closed are ignored and IPCThreadState::talkWithDriver instead returns an error which will cause the pool thread to exit and detach itself from the vm. A check to avoid calling ioctl to a fd with -1 was also added in IPCThreadState::threadDestructor. Another solution might be to change the binder driver so that it returns an error when the fd is closed (or atleast not a BR_SPAWN_LOOPER command). It might also be possible to call exit(0) which is done when System.exit(0) is called from java. Change-Id: I3d1f0ff64896c44be2a5994b3a90f7a06d27f429
* | Pass fences from BufferQueue to SurfaceTextureClientJesse Hall2012-06-213-18/+28
| | | | | | | | | | | | | | | | | | | | ISurfaceTexture::dequeueBuffer now returns the buffer's fence for the client to wait on. For BufferQueue, this means passing it through Binder so it can be returned to the SurfaceTextureClient. Now SurfaceTextureClient is responsible for waiting on the fence in dequeueBuffer instead of BufferQueue: one step closer to the goal. Change-Id: I677ae758bcd23acee2d784b8cec11b32cccc196d
* | Transfer HWC release fences to BufferQueueJesse Hall2012-06-215-15/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After a HWC set, each SurfaceFlinger Layer retrieves the release fence HWC returned and gives it to the layer's SurfaceTexture. The SurfaceTexture accumulates the fences into a merged fence until the next updateTexImage, then passes the merged fence to the BufferQueue in releaseBuffer. In a follow-on change, BufferQueue will return the fence along with the buffer slot in dequeueBuffer. For now, dequeueBuffer waits for the fence to signal before returning. The releaseFence default value for BufferQueue::releaseBuffer() is temporary to avoid transient build breaks with a multi-project checkin. It'll disappear in the next change. Change-Id: Iaa9a0d5775235585d9cbf453d3a64623d08013d9
* | Move remaining bits of lockBuffer to dequeueBufferJesse Hall2012-06-211-13/+4
| | | | | | | | | | | | | | FramebufferNativeWindow::dequeueBuffer now waits for the next buffer to be non-front in addition to being free. Change-Id: I991f154958cc6b488b1241aba83d1f95a0513b3c
* | Update ANativeWindow clients for syncJamie Gennis2012-06-208-343/+332
| | | | | | | | | | | | | | This change updates the uses of ANativeWindow to use the new ANW functions that accept and return Sync HAL fence file descriptors. Change-Id: I3ca648b6ac33f7360e86754f924aa072f95242f6
* | libui: add the Fence classJamie Gennis2012-06-201-0/+95
| | | | | | | | | | | | | | This change adds the Fence class to libui for to wrap the libsync functionality. Change-Id: I93a31baeee608b93c14da807a32013dabf783f84
* | Implement SurfaceFlinger's ANW on top of BufferQueueMathias Agopian2012-06-131-5/+10
| | | | | | | | | | | | | | | | SF now has its own implementation of ANW for the framebuffer and it uses BufferQueue. FramebufferNativeWindow is now only used by stand-alone apps. Change-Id: Iddeb24087df62bd92b0f78e391dda9b97ddc859c
* | Merge "surfaceflinger: replace early suspend with binder call from PowerManager"Colin Cross2012-06-081-0/+22
|\ \
| * | surfaceflinger: replace early suspend with binder call from PowerManagerColin Cross2012-06-071-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | SurfaceFlinger will no longer directly synchronize with early suspend. Instead, PowerManagerService will synchronize with SurfaceFlinger to ensure that a black frame has been drawn on the display, and then trigger all early suspend handlers. Change-Id: I07acdd628440d23fdb69db94319ec5d65d3f4919
* | | am 1ba24574: Aligning native Parcel implementation to Java.Magnus Strandberg2012-06-081-1/+2
|\ \ \ | |/ / |/| / | |/ | | * commit '1ba24574b2debd3ca012adbbd77f12bed4f2d266': Aligning native Parcel implementation to Java.
| * Aligning native Parcel implementation to Java.Magnus Strandberg2012-06-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | The Java implementation of writing the RPC response header calculates the length of the header including the 4 bytes specifying the header length but the native implementation excludes the 4 bytes specifying the length from the header length. The native implementation has been aligned to the Java impl. Change-Id: I325bf272a63152d8fded4cf4e51a906b5a9bfe19
* | am d5085da3: am 4467bba7: Merge "Support looper callbacks based on smart ↵Jeff Brown2012-05-311-12/+36
|\ \ | |/ | | | | | | | | | | pointers." into jb-dev * commit 'd5085da3c0c103bba0c2c927382f7d414275b661': Support looper callbacks based on smart pointers.
| * Merge "Support looper callbacks based on smart pointers." into jb-devJeff Brown2012-05-311-12/+36
| |\
| | * Support looper callbacks based on smart pointers.Jeff Brown2012-05-311-12/+36
| | | | | | | | | | | | | | | Bug: 6559630 Change-Id: I5a667f219f431838638acefbc9fa6afa610971bd
* | | am 80586761: am dad23789: Merge "Delete unused poll() code." into jb-devJeff Brown2012-05-311-139/+0
|\ \ \ | |/ / | | | | | | | | | * commit '805867612c0c11d3bb494cbf454cbb2de21a1b75': Delete unused poll() code.
| * | Merge "Delete unused poll() code." into jb-devJeff Brown2012-05-311-139/+0
| |\ \ | | |/
| | * Delete unused poll() code.Jeff Brown2012-05-301-139/+0
| | | | | | | | | | | | | | | | | | | | | We don't need this code anymore and it is just in the way. Bug: 6559630 Change-Id: I1dc9decf85d5ea1feab159c2985da6c20baffdd5
* | | am dce1547d: am 9e2e781a: Merge "Remove unused statistics code." into jb-devJeff Brown2012-05-311-68/+0
|\ \ \ | |/ / | | | | | | | | | * commit 'dce1547d65877b89cec4e52ee8e5b39830911d00': Remove unused statistics code.
| * | Merge "Remove unused statistics code." into jb-devJeff Brown2012-05-311-68/+0
| |\ \ | | |/
| | * Remove unused statistics code.Jeff Brown2012-05-301-68/+0
| | | | | | | | | | | | | | | Bug: 6559630 Change-Id: Iacdf4bb4c1c125c09305cbd8cb443c7c80cfc010
* | | am 584fcb32: am 2c8207e9: add the ability to reject buffers in ↵Mathias Agopian2012-05-291-0/+14
|\ \ \ | |/ / | | | | | | | | | | | | | | | SurfaceTexture::updateTexImage * commit '584fcb3218e07d7b4cc0aeaef41faa4e891b45a4': add the ability to reject buffers in SurfaceTexture::updateTexImage
| * | add the ability to reject buffers in SurfaceTexture::updateTexImageMathias Agopian2012-05-231-0/+14
| |/ | | | | | | | | | | | | | | SurfaceFlinger is using this new feature to reject buffers that don't have the right size. Bug: 6498869 Change-Id: I8a7250a47db6c082a357b703feb3b9d0fc8d3443
* | am 138a8d75: am e1082496: Enable SurfaceTexture fence sync for the emulatorJesse Hall2012-05-221-0/+4
|\ \ | |/ | | | | | | * commit '138a8d7510e6ba8a402ffacc38c7cc5bfaa5e571': Enable SurfaceTexture fence sync for the emulator
| * Enable SurfaceTexture fence sync for the emulatorJesse Hall2012-05-221-0/+4
| | | | | | | | | | | | | | | | The host-accelerated GL ES driver doesn't do the implicit synchronization required when fence sync isn't used. Bug: 6515813 Change-Id: I6a667f2db6b519f3557b5abda78775f767841dae
* | am 83f1d839: am 7e477bfe: make sure BufferQueue releases newly acquired ↵Mathias Agopian2012-05-211-24/+28
|\ \ | |/ | | | | | | | | | | buffers on failures * commit '83f1d83975345bada9886e9ea0ef2b950d90cd77': make sure BufferQueue releases newly acquired buffers on failures
| * make sure BufferQueue releases newly acquired buffers on failuresMathias Agopian2012-05-181-24/+28
| | | | | | | | | | | | | | | | | | | | this prevents SurfaceTexture producer to hang in dequeueBuffer() when something goes wrong in the consumer. only the consumer gets an error and the current frame is kept instead of the new one. the producer is unaware of the problem. Bug: 6476587 Change-Id: Ie6db5526632aabc3e60229b93dfe29c19491ade4
* | am ac4a4825: am f899e411: Remove misleading and wrong ALOGWMathias Agopian2012-05-211-2/+0
|\ \ | |/ | | | | | | * commit 'ac4a48251180a79ae19e3a7112537c3d0fa260c6': Remove misleading and wrong ALOGW
| * Remove misleading and wrong ALOGWMathias Agopian2012-05-181-2/+0
| | | | | | | | | | Bug: 6476587 Change-Id: I4345f1100db02786bb50ad83ca7b559cad301706
* | am e0607f05: am 5aed6843: Merge "fix a corruption in Vector<> when adding ↵Mathias Agopian2012-05-213-1/+77
|\ \ | |/ | | | | | | | | | | new items" into jb-dev * commit 'e0607f0507fe647bd9262facfaf75146c074e933': fix a corruption in Vector<> when adding new items
| * Merge "fix a corruption in Vector<> when adding new items" into jb-devMathias Agopian2012-05-173-1/+77
| |\
| | * fix a corruption in Vector<> when adding new itemsMathias Agopian2012-05-173-1/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | would happen when vectors are copied and new items is added in both vectors. we didn't duplicate the underlying storage when adding items in vectors. Bug: 6515797 Change-Id: If544c07d96c05821e088d7f2c9b5736f7e306c31
* | | am bd56aabb: am 515f19da: Merge "Recreate EGLImage for previously used ↵Jesse Hall2012-05-212-3/+33
|\ \ \ | |/ / | | | | | | | | | | | | | | | slots" into jb-dev * commit 'bd56aabb92097546073c8dd8949bb03161e72c56': Recreate EGLImage for previously used slots
| * | Recreate EGLImage for previously used slotsJesse Hall2012-05-172-3/+33
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | SurfaceTexture would only create an EGLImage for a buffer slot when BufferQueue returns a GraphicBuffer, i.e. either the slot was acquired for the first time ever, or the buffer for the slot was reallocated. But the EGLImage may also need to be re-created for a previously-acquired buffer if the slot's EGLImage was destroyed during detachFromContext(); in this case BufferQueue won't return a GraphicBuffer since SurfaceTexture already has a reference to the correct buffer. Bug: 6461693 Change-Id: Ib95d0d757192efe336c5fda0866f857481a6617d
* | am dd739965: Merge changes I32fbc2b6,Ifd0ed05b into jb-devJamie Gennis2012-05-153-95/+4
|\ \ | |/ | | | | | | | | * commit 'dd73996552938ac5165a35f09d389abedcf421ef': SurfaceFlinger: recompute visible regions less libgui: remove setPostTransformCrop
| * Merge changes I32fbc2b6,Ifd0ed05b into jb-devJamie Gennis2012-05-153-95/+4
| |\ | | | | | | | | | | | | | | | * changes: SurfaceFlinger: recompute visible regions less libgui: remove setPostTransformCrop
| | * libgui: remove setPostTransformCropJamie Gennis2012-05-143-95/+4
| | | | | | | | | | | | | | | | | | | | | | | | This change removes the setPostTransformCrop function from SurfaceTextureClient. It also includes a small logging fix in BufferQueue. Bug: 6299171 Change-Id: Ifd0ed05b95dad6085e7a8267fda4d69b76ea3bad
* | | am bd113224: Merge "Fix log spam about CPU frequency on one device" into jb-devGlenn Kasten2012-05-151-19/+22
|\ \ \ | |/ / | | | | | | | | | * commit 'bd1132249479e52ddd128171da24327358e2191c': Fix log spam about CPU frequency on one device
| * | Fix log spam about CPU frequency on one deviceGlenn Kasten2012-05-141-19/+22
| |/ | | | | | | | | | | | | | | | | | | | | | | Previous kernels have allowed opening the CPU frequency file regardless whether the CPU is up or not. This fixes some log spam on one device with dynamic hot plug CPU feature, which does not allow opening the CPU frequency file if CPU is down. Also, since the file descriptors are global and have long lives, add the close-on-exec flag. Change-Id: Ia14a2b9e20038dfb96a573920176a47a96bd3f5a
* | Add a BufferQueue CPU consumer.Eino-Ville Talvala2012-05-144-1/+841
| | | | | | | | | | | | | | | | | | | | | | Aimed for use cases where gralloc buffers need to be consumed by CPU users, such as camera image data streams. The CpuConsumer is a synchronous queue, which exposes raw pointers to the underlying graphics buffers to applications. Multiple buffers may be acquired at once, up to the limit set at time of construction. Change-Id: If1d99f12471438e95a69696e40685948778055fd
* | am f15a83f5: SurfaceFlinger: add a crop to the layer stateJamie Gennis2012-05-143-1/+24
|\ \ | |/ | | | | | | * commit 'f15a83f5814219c167f87cb8aaea622fc8493499': SurfaceFlinger: add a crop to the layer state
| * SurfaceFlinger: add a crop to the layer stateJamie Gennis2012-05-113-1/+24
| | | | | | | | | | | | | | | | | | This change adds a crop rectangle specified in window coordinates to the layer state. The all window pixels outside this crop rectangle are treated as though they were fully transparent. This change also adds the plumbing necessary for WindowManager to set that crop. Change-Id: I582bc445dc8c97d4c943d4db8d582a6ef5a66081
* | am f30fd014: Merge "Workaround for add_tid_to_cgroup failed to write" into ↵Glenn Kasten2012-05-101-1/+3
|\ \ | |/ | | | | | | | | | | jb-dev * commit 'f30fd01497a53cbff8692721026c3f7b6830158e': Workaround for add_tid_to_cgroup failed to write
| * Merge "Workaround for add_tid_to_cgroup failed to write" into jb-devGlenn Kasten2012-05-101-1/+3
| |\
| | * Workaround for add_tid_to_cgroup failed to writeGlenn Kasten2012-05-101-1/+3
| | | | | | | | | | | | | | | Bug: 6467109 Change-Id: I6dff8e608d83c7a7c453c25c94ad100f113769b9
* | | am cd1806e2: libgui: improve some logging and dumpingJamie Gennis2012-05-102-8/+22
|\ \ \ | |/ / | | | | | | | | | * commit 'cd1806e210f2633423f0fb14d39fa00d03974223': libgui: improve some logging and dumping
| * | libgui: improve some logging and dumpingJamie Gennis2012-05-102-8/+22
| |/ | | | | | | | | | | | | | | | | | | This change updates some of the SurfaceTextureClient and BufferQueue logging and dumping to include the crop, transform and scaling mode. It also removes the uses of the NO_SCALE_CROP scaling mode enum, which was added by accident in a previous change. Change-Id: I62912716a1e48885fb22f12b92678aa13f10fcd9 Bug: 6470541
* | am 555f89d8: Add callback hack to find out when to reload system properties.Dianne Hackborn2012-05-103-5/+84
|\ \ | |/ | | | | | | * commit '555f89d8df316cdc5a25dbedb8614c2ac7a5e0a9': Add callback hack to find out when to reload system properties.
| * Add callback hack to find out when to reload system properties.Dianne Hackborn2012-05-093-5/+84
| | | | | | | | | | | | | | | | | | | | | | | | Every IBinder object can accept a new transaction to tell it that it might want to reload system properties, and in the process anyone can register a callback to be executed when this happens. Use this to reload the trace property. This is very much ONLY for debugging. Change-Id: I55c67c46f8f3fa9073bef0dfaab4577ed1d47eb4