summaryrefslogtreecommitdiffstats
path: root/libs/gui
Commit message (Collapse)AuthorAgeFilesLines
* SurfaceTexture: disallow unsupported uses.Jamie Gennis2011-03-151-1/+44
| | | | | | | | | | This change makes the ANativeWindow_lock NDK function error out if it is passed an ANativeWindow with a concrete type that is not Surface. It also makes eglCreateWindowSurface fail if it is passed a SurfaceTextureClient as its 'window' argument. Bug: 4087277 Change-Id: Ie68c50c52d88f72d8a387f6c094908044c83a88c
* SurfaceTextureClient: Add ISurfaceTexture getter.Jamie Gennis2011-03-142-0/+9
| | | | | | | | | This change adds a getter method to SurfaceTextureClient to get the ISurfaceTexture object with which the SurfaceTextureClient is communicating. Bug: 4086509 Change-Id: Ifec621e0fe5392a5be56b2348fdc54067cbebcdd
* ANativeWindow: add query for the concrete type.Jamie Gennis2011-03-142-0/+11
| | | | | | | | This change adds a query to the ANativeWindow interface for getting the concrete type of the ANativeWindow. Bug: 4086509 Change-Id: I64aa86d72fbca3b52a98e1fc35608737781a3178
* SurfaceTexture: fix transform matrix computation.Jamie Gennis2011-03-143-25/+675
| | | | | | | | | This change fixes the transform matrix computation in SurfaceTexture when a crop rectangle is specified by the image producer. It also adds a test for this case as well as a basic test for the uncropped case. Bug: 4070775 Change-Id: I1481c9ce9d08fe7f2bff86d3afdeab7d4002b157
* ANativeWindow: add queues-to-window-composer check.Jamie Gennis2011-03-083-0/+104
| | | | | | | | | This change adds a new 'method' to the ANativeWindow interface to check whether buffers queued to the window will be sent directly to the system window compositor. Change-Id: I4d4b199e328c110b68b250029aea650f03c8724d Bug: 3495535
* Add the MIN_UNDEQUEUED_BUFFERS query to ANW.Jamie Gennis2011-02-282-2/+20
| | | | | | | | | This change adds a new query to ANativeWindow for getting the minimum number of buffers that must be left un-dequeued during the steady-state operation of the ANativeWindow. Change-Id: Ie8c461fc26b02ecde02ddb4f95bf763662cf1551 Related-Bug: 3356050
* am c7839751: am c2efcd2c: Merge "Initialize the SurfaceTexture transform ↵Jamie Gennis2011-02-071-1/+2
|\ | | | | | | | | | | | | fields." into honeycomb * commit 'c7839751aa1de52e0c3aab7dd1518b0fc8f2ee0a': Initialize the SurfaceTexture transform fields.
| * Initialize the SurfaceTexture transform fields.Jamie Gennis2011-02-041-1/+2
| | | | | | | | | | Change-Id: I2c25f15949253a1dbe493fef440e5ef118c40e71 related-bug: 3426067
* | am 421d94c2: am ecb4b3f0: Merge "Pass the IGraphicBufferAlloc to ↵Jamie Gennis2011-02-023-2/+24
|\ \ | |/ | | | | | | | | | | SurfaceTextureClient." into honeycomb * commit '421d94c20321e1de528416b279bf148baba47b39': Pass the IGraphicBufferAlloc to SurfaceTextureClient.
| * Pass the IGraphicBufferAlloc to SurfaceTextureClient.Jamie Gennis2011-02-023-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | This change passes a reference to the IGraphicBufferAlloc binder object to SurfaceTextureClient objects. When STC objects are created they query their associated ISurfaceTexture object for the IGraphicBufferAlloc that the SurfaceTexture uses to allocate buffers. Having the SurfaceTextureClient hold this reference prevents the GraphicBufferAlloc in SurfaceFlinger from freeing the allocated buffers before the SurfaceTextureClient is done with them. Change-Id: Ib8e30e8b37fdd60438cbb4cb7e9174d0ba6d661c related-bug: 3362519
* | Clear GL errors before updating a SurfaceTexture.Jamie Gennis2011-01-311-2/+10
|/ | | | Change-Id: Ibdac657ae9e9ccae53c63abed9caf1f1513915c2
* Reset ANativeWindow crop on buffer geometry changes.Jamie Gennis2011-01-281-6/+11
| | | | | | | | | This changes the ANativeWindow API and the two implementations to reset the window's crop rectangle to be uncropped when the window's buffer geometry is changed. Bug: 3359604 Change-Id: I64283dc8382ae687787ec0bebe6a5d5b4a0dcd6b
* Quiet the SurfaceFlingerClient dequeueBuffer error.Jamie Gennis2011-01-281-1/+1
| | | | | | | | | | | | This is a temporary WAR for the case where dequeueBuffer is called when all the buffers owned by a SurfaceTexture are not available - either they're the current texture buffer or the next one. Currently, an error is returned in that case, and this change just prevents that error from being logged. In the future this will be fixed to not return an error in that case. Bug: 3356050 Change-Id: Ic6cc304881a63ce134cfd0bcb4265e3e3fa94b6a
* Implement SurfaceTexture frame-available callback.Jamie Gennis2011-01-161-0/+10
| | | | | | | | This change implements the onFrameAvailable callback for the SurfaceTexture java class. It includes the C++ SurfaceTexture code as well as the JNI and Java code to enable the callback. Change-Id: Ifd8b8e7ad46ee70cba6da1c2e96dab8045d1ea30
* Fix SurfaceTexture transform matrix.Jamie Gennis2011-01-161-30/+48
| | | | Change-Id: I31520c547cafa5cc85cd0f73883ab3a9ff4648e2
* Compare GraphicBuffers using handles.Jamie Gennis2011-01-151-2/+2
| | | | | | | This change fixes a bug in SurfaceTextureClient where GraphicBuffers were being compared using pointer comparison rather than handles. Change-Id: Ib8989af94be32d4efd86e020a732f5143088a863
* Fix remote GraphicBuffer allocation in SurfaceFlinger.Jamie Gennis2011-01-131-13/+30
| | | | | | | | | | | This change fixes a horrible hack that I did to allow application processes to create GraphicBuffer objects by making a binder call to SurfaceFlinger. This change introduces a new binder interface specifically for doing this, and does it in such a way that SurfaceFlinger will maintain a reference to the buffers until the app is done with them. Change-Id: Icb240397c6c206d7f69124c1497a829f051cb49b
* Add logging to SurfaceTextureClient.Jamie Gennis2011-01-131-0/+15
| | | | Change-Id: I984c3b9c88f8af613a50138188ff1b770e2de6b4
* Fix a bug in SurfaceTexture::dequeueBuffer.Jamie Gennis2011-01-121-1/+1
| | | | | | | | | This change fixes a bug that allowed the most recently queued buffer to be returned by dequeueBuffer. At the next updateTexImage call, the dequeued buffer would be set as the contents of the texture even though the client could be writing to it. Change-Id: I53dc14eed13262475627d5551337df57fd78fe00
* Implement crop & transform for SurfaceTexture.Jamie Gennis2011-01-121-4/+115
| | | | | | | | | This change adds support for the setCrop and setTransform methods of the SurfaceTexture C++ class. The crop and transform for the current texture will be accessed by applications as a single texture coordinate transform matrix. Change-Id: I6482bf96f680e5c175364e848936db3908d6c8f8
* Fix a bug in SurfaceTexture::setBufferCount.Jamie Gennis2011-01-091-0/+2
| | | | | | | We need to reset mCurrentTexture and mLastQueued in setBufferCount because it frees all of the buffers associated with the buffer slots. Change-Id: Ie2f834ec1c07ce7a4ab9b2b5fc5fe8c294010c60
* Add method logging to the SurfaceTexture C++ class.Jamie Gennis2011-01-091-0/+11
| | | | Change-Id: Ic05b05428d34c04634ce9fc3f924ff3322bb2da2
* Initialize the SurfaceTexture buffer slots.Jamie Gennis2011-01-091-0/+5
| | | | Change-Id: I81a562ad897173f33cd6a2127737718a7db610eb
* Add the SurfaceTexture C++ implementation.Jamie Gennis2011-01-064-2/+698
| | | | | | | | | | This change adds the C++ implementation of SurfaceTexture and related classes. The goal of this is for a SurfaceTexture to be passed to camera service or Stagefright in place of a Surface to allow camera preview or decoded video frames to be streamed to an OpenGL ES texture that an application can use. Change-Id: I55c83a7017f1ecb81c9c9e3252cbd118b914296c
* Fix typo which causes sensors to fail miserablyMathias Agopian2010-09-161-1/+1
| | | | Change-Id: Ieca18fc089e2bdf7d049f213836971b54d11cd76
* part of fix for [3004226] Cannot end the call - Proximity sensor doesn't workMathias Agopian2010-09-161-2/+16
| | | | | | | - In SensorEventQueue, only bail on errors from Looper::loopOnce - Improve sensor error logging Change-Id: Ib3cf8d5d9fdac8513a3d753155827e0feeda1662
* Replace epoll() with poll() and rename PollLoop to Looper.Jeff Brown2010-09-141-11/+11
| | | | | | | | | | | | | | | As part of this change, consolidated and cleaned up the Looper API so that there are fewer distinctions between the NDK and non-NDK declarations (no need for two callback types, etc.). Removed the dependence on specific constants from sys/poll.h such as POLLIN. Instead looper.h defines events like LOOPER_EVENT_INPUT for the events that it supports. That should help make any future under-the-hood implementation changes easier. Fixed a couple of compiler warnings along the way. Change-Id: I449a7ec780bf061bdd325452f823673e2b39b6ae
* Modify native ALooper to take an explicit ident.Dianne Hackborn2010-09-071-1/+1
| | | | | | | | The ALooper API now uses an explicit "identifier" for the integer that is returned rather than implicitly using the fd. This allows the APIs that had the fd to be a little more sane. Change-Id: I8507f535ad484c0bdc4a1bd016d87bb09acd7ff0
* Added SensorManager.getMinDelay()Mathias Agopian2010-07-292-4/+12
| | | | | | | | | | | | | Exposed the new "min delay" sensor property through native and java sensor apis. This allows the caller to know what is the maximum rate at which a sensor can return events, or, if a sensor works in "update" mode (events returned only when the value changes). Also augmented SensorManager.regusterSensorEvent() so that it can accept a value in microsecond in addition to the 4 constants already defined. Change-Id: If425e9979892666df8c989d7de3c362230fa19e0
* Fix a memory corruption when writting Sensor into a parcelMathias Agopian2010-07-221-1/+1
| | | | Change-Id: I03f703ae2224f43924031bfea4c68aa979bb9f05
* propagate sensor event rate properlyMathias Agopian2010-07-211-2/+6
| | | | Change-Id: I32e67d30e4295285a6827956cc8161b2025d70bc
* new SensorServiceMathias Agopian2010-07-195-12/+82
| | | | | | | remove old sensor service and implement SensorManager on top of the new (native) SensorManger API. Change-Id: Iddb77d498755da3e11646473a44d651f12f40281
* first step at implementing the native sensor supportMathias Agopian2010-07-137-0/+656
in this commit: - implemented the C stub - implemented the binder interfaces involved - implemented most of the C++ client side missing: - SensorManager cannot connect to the SensorServer yet (because there is no SensorServer yet) Change-Id: I75010cbeef31c98d6fa62fd5d388dcef87c2636b