summaryrefslogtreecommitdiffstats
path: root/include/gui
Commit message (Collapse)AuthorAgeFilesLines
* Merge "changes to SurfaceTexture needed for unification with SF"Mathias Agopian2011-04-182-3/+44
|\
| * changes to SurfaceTexture needed for unification with SFMathias Agopian2011-04-112-3/+44
| | | | | | | | | | | | | | | | - implement connect/disconnect - implement missing query - handle texture_2d in addition to texture_external_oes Change-Id: I971a70821f00f22b01f5337de4a7d451177fec4d
* | Fix a GraphicBuffer leak in SurfaceTextureMathias Agopian2011-04-081-6/+0
|/ | | | | | | | | | | | | | | | | This leak was intentional, it was there to deal with the fact that some gralloc implementations don't track buffer handles with file-descriptors so buffers needed to stay alive until there were registered, which is not guaranteed by binder transactions. In this new implementation, we use a small BBinder holding a reference to the buffer, which with tuck into the parcel. This forces the reference to stay alive until the parcel is destroyed, which is guaranteed (by construction) to happen after the buffer is registered. this allows the public facing API to not expose the previous hack. Change-Id: I1dd6cd83679a2b7457ad628169e2851acc027143
* SurfaceTexture can now force the client to request a bufferMathias Agopian2011-04-012-0/+27
| | | | | | | | | | | | SurfaceTexture now has the concept of default size a new method, setDefaultBufferSize() to set it. When the default size is changed, dequeueBuffer() will return a value telling the client that it must ask for a new buffer. The above only applies if the client has not overriden the buffer size with setGeometry. Change-Id: I520dc40363054b7e37fdb67d6a2e7bce70326e81
* Add support for timestamps into SurfaceTexture.Eino-Ville Talvala2011-03-173-3/+34
| | | | | | | | | | | | | | | | | API addition: The timestamps are represented as nanoseconds from some arbitrary time point. Like the SurfaceTexture transform matrix, the timestamp retrieved by getTimestamp is for the last frame sent to the GL texture using updateTexImage(). Camera HAL change: Expect vendors to set these timestamps using native_window_set_buffers_timestamp(). For now, they are autogenerated by SurfaceTextureClient if set_buffers_timestamp() is never called, but such timing is likely not accurate enough to pass a CTS test. bug:3300707 Change-Id: Ife131a0c2a826ac27342e11b8a6c42ff49e1bea7
* SurfaceTextureClient: Add ISurfaceTexture getter.Jamie Gennis2011-03-141-0/+2
| | | | | | | | | This change adds a getter method to SurfaceTextureClient to get the ISurfaceTexture object with which the SurfaceTextureClient is communicating. Bug: 4086509 Change-Id: Ifec621e0fe5392a5be56b2348fdc54067cbebcdd
* Add the MIN_UNDEQUEUED_BUFFERS query to ANW.Jamie Gennis2011-02-282-13/+15
| | | | | | | | | 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
* Pass the IGraphicBufferAlloc to SurfaceTextureClient.Jamie Gennis2011-02-023-0/+16
| | | | | | | | | | | | | 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
* Implement SurfaceTexture frame-available callback.Jamie Gennis2011-01-161-0/+13
| | | | | | | | 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 remote GraphicBuffer allocation in SurfaceFlinger.Jamie Gennis2011-01-131-0/+19
| | | | | | | | | | | 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
* Implement crop & transform for SurfaceTexture.Jamie Gennis2011-01-121-0/+46
| | | | | | | | | 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-2/+5
| | | | | | | 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 the SurfaceTexture C++ implementation.Jamie Gennis2011-01-063-0/+348
| | | | | | | | | | 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
* Replace epoll() with poll() and rename PollLoop to Looper.Jeff Brown2010-09-141-3/+3
| | | | | | | | | | | | | | | 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
* Added SensorManager.getMinDelay()Mathias Agopian2010-07-292-1/+3
| | | | | | | | | | | | | 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
* propagate sensor event rate properlyMathias Agopian2010-07-211-2/+4
| | | | Change-Id: I32e67d30e4295285a6827956cc8161b2025d70bc
* new SensorServiceMathias Agopian2010-07-194-5/+15
| | | | | | | 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-136-0/+389
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