summaryrefslogtreecommitdiffstats
path: root/include/gui
Commit message (Collapse)AuthorAgeFilesLines
* Merge "remove dead code and member variables."Mathias Agopian2011-07-261-14/+2
|\
| * remove dead code and member variables.Mathias Agopian2011-07-251-14/+2
| | | | | | | | | | | | also fix some comments and improve debugging logs. Change-Id: I83e55309f306332b59e1ec46104c4a7fffbf3c97
* | Merge "SurfaceTexture: enable RGB external textures"Jamie Gennis2011-07-251-5/+0
|\ \ | |/ |/|
| * SurfaceTexture: enable RGB external texturesJamie Gennis2011-07-221-5/+0
| | | | | | | | | | | | | | | | This change removes support for conditionally using the GL_TEXTURE_2D target for SurfaceTexture textures with RGB buffers. It also enables and fixes the RGB-based SurfaceTexture tests. Change-Id: I9a251a981cf66af6b048b2e4c3fe7231e4774f4d
* | SurfaceTexture: add the abandon method.Jamie Gennis2011-07-222-2/+20
|/ | | | | | | | This change adds the 'abandon' method to the SurfaceTexture C++ class. This method may be used to put the SurfaceTexture in an abandoned state, causing all ISurfaceTexture methods to fail. Change-Id: Ibd261f7b73f44e2bec36a8508bf92113cfb7cf95
* SurfaceTexture: fix a commentJamie Gennis2011-07-211-2/+1
| | | | Change-Id: I799532f77f8fbb6b8ee6888fdd8852b6f28e8c33
* SurfaceTexture: remove getAllocatorJamie Gennis2011-07-212-10/+0
| | | | | | | | This change removes the SurfaceTexture::getAllocator method, as it's no longer needed. Proper refcounting of the Gralloc buffers is now handled by the IGraphicBufferAlloc binder marshalling code. Change-Id: I5cffa6ebfc1bc5828fb7ce0e0a5b2f55cd8479da
* clean-up. get rid ofunused code and members in Surface[Control].cppMathias Agopian2011-07-201-2/+2
| | | | Change-Id: Ia7790ae28af2c2ac99eae01c2c5044ace4a490a4
* implement: "Add an ANativeWindow API for SurfaceFlinger to suggest an ↵Mathias Agopian2011-07-193-2/+20
| | | | | | | optimal buffer orientation" Bug: 4487161 Change-Id: I883f34efe542c2a566d04966f873374f40c50092
* Add set_scaling_mode() to ANativeWindow.Mathias Agopian2011-07-193-3/+24
| | | | | | | This allows to specify the scaling mode independently from the buffer size. Change-Id: Iaa2baa660445531a97d3fac192e580f4929c5d3b
* move lock/unlock implementaion outside of Surface into SurfaceTextureClientMathias Agopian2011-07-151-32/+46
| | | | | | | | | | This makes ANativeWindow_lock/ANativeWindow_unlockAndPost work with ANativeWindows implemented by Surface and SurfaceTextureClient. Also, Surface now inherits directly from SurfaceTextureClient. Bug: 5003724 Change-Id: I9f285877c7bae9a262e9a7af91c2bae78804b2ef
* Merge changes Id9aa1003,I8c154189Jamie Gennis2011-07-143-3/+42
|\ | | | | | | | | | | * changes: SurfaceTexture: make (dis)connect into an IPC SurfaceTexture: add support for new connect values
| * SurfaceTexture: make (dis)connect into an IPCJamie Gennis2011-07-143-3/+42
| | | | | | | | | | | | | | | | This change makes the ANativeWindow connect and disconnect calls result in an IPC to the SurfaceTexture object. This will allow us to prevent multiple simultaneous connections from different processes. Change-Id: Id9aa1003b1335b96ca6bd4a1f5a67aa433d42efb
* | EGL: fix the ANativeWindow size/fmt overrideJamie Gennis2011-07-111-1/+4
|/ | | | | | | | | | | | | | | | | | | This change fixes how the Android EGL layer overrides the size and format of an ANativeWindow in eglCreateWindowSurface. The new behavior is to leave the size untouched when overriding the format. The previous behavior was to reset the ANativeWindow to use the default size set by the ANativeWindow implementation. It also adds two new 'perform' methods to the ANativeWindow interface: set_buffers_dimensions and set_buffers_format, and redefines the behavior of set_buffers_geometry to be the combination of these two new methods. Additionally, this change adds an error check for the return value of the new native_window_set_buffers_format call, which required adding a (stub) handler for to FramebufferNativeWindow. Change-Id: I805c7ccd8d4730dfb132d10d8bc3fb058a0b9df1
* Merge "Minor fix in SurfaceTexture"Pannag Sanketi2011-06-301-2/+2
|\
| * Minor fix in SurfaceTexturePannag Sanketi2011-06-301-2/+2
| | | | | | | | Change-Id: Ic859715becf3e6d5107bd8beb8c577034d00ec52
* | SurfaceTexture: change onFrameAvailable behaviorJamie Gennis2011-06-271-10/+8
|/ | | | | | | | | | | | | | | | | | This change alters the conditions under which the onFrameAvailable callback gets called by the C++ SurfaceTexture class. The new behavior is to call the callback whenever a frame gets queued that will be visible to the buffer consumer. This means that buffers queued in synchronous mode always trigger the callback, as those buffers will remain pending until they are consumed. Buffers queued in asynchronous mode will only trigger the callback if there was not previously an unconsumed buffer pending. The new behavior means that a consumer should perform a draw operation exactly once for every onFrameAvailable call that it recieves. This change also modifies SurfaceFlinger and the SurfaceTexture JNI to support of the new behavior. Change-Id: I8b2c6e00961d3d58b11c6af50b555b6e4c5f5b40
* Add allowSynchronousMode to SurfaceTexture constructor.Grace Kloba2011-06-231-1/+4
| | | | Change-Id: I54f30a3c16bbe6b813f3bcd1d389da5627531304
* SurfaceTexture: fix a NULL ptr dereference.Jamie Gennis2011-06-201-0/+1
| | | | | | | | | This change adds a NULL check when searching the slot list in SurfaceTextureClient for the slot corresponding to a buffer being queued or canceled. Bug: 4645023 Change-Id: I806cbc1e34da118ea33a83c4f25ce8193ba1c3ad
* SurfaceTexture: fix up a comment.Jamie Gennis2011-06-131-3/+3
| | | | Change-Id: I044e44e17319e08af657a7ec9fa39100876fe862
* SurfaceTexture: fix a getTransformMatrix crash.Jamie Gennis2011-06-131-0/+11
| | | | | | | | | | | | This change moves the computation of the transform matrix out of getTransformMatrix and instead performs the computation when updateTexImage gets called. This is needed in order for getTransformMatrix to succeed even if the buffers have been freed (e.g. by changing the buffer count) because the computation depends upon the properties of the current GraphicBuffer. Change-Id: Ied541ab8747b7ad604f862717135f9a16a816be9 Bug: 4490420
* 9-axis sensor fusion with Kalman filterMathias Agopian2011-05-271-1/+5
| | | | | | | Add support for 9-axis gravity and linear-acceleration sensors virtual orientation sensor using 9-axis fusion Change-Id: I6717539373fce781c10e97b6fa59f68a831a592f
* SurfaceTexture: clean up some comments, tests, etc.Jamie Gennis2011-05-251-20/+45
| | | | | | | This change fixes up some stale comments, member variable names, log messages and disables a failing test. Change-Id: Ic1d3344b18066cf710e4a42838b2417c6b1f2f6c
* fix onFrameAvailableMathias Agopian2011-05-111-0/+10
| | | | Change-Id: I391fe9f6684ac9fd4f91416ce18b583f7087d966
* Add SurfaceTexture loggingMathias Agopian2011-05-111-0/+5
| | | | Change-Id: If1b74be5230813fb76429935d88b9d4a7c41700c
* Implement {Surface|SurfaceTextureClient}::setSwapInterval()Mathias Agopian2011-05-113-12/+39
| | | | Change-Id: I8382e346ddaa2c4c8ff56ac3ffd7f0109572f188
* Add the concept of synchronous dequeueBuffer in SurfaceTextureMathias Agopian2011-05-111-21/+50
| | | | Change-Id: Ic94cbab092953243a0746e04bbe1b2eb0cc930ef
* unify SurfaceTexture and SurfaceMathias Agopian2011-05-112-0/+11
| | | | Change-Id: I49da2f5d8408e4cd7e148cfb777bb4ff68cd8f37
* Fix a bug where setgeometry couldn't be undoneMathias Agopian2011-05-112-11/+6
| | | | | | | | | | | | | | | | | This change the binder protocol between SurfaceTextureClient and SurfaceTexture. dequeueBuffer() now takes the requested parameters for the buffer. SurfaceTexture decides if the buffer needs to be reallocated and does the allocation if needed. In that case it returns BUFFER_NEEDS_REALLOCATION to tell SurfaceTextureClient that it needs to call requestBuffer (which all parameters have been removed) to acquire a pointer to the buffer. dequeueBuffer and requestBuffer could be folded into a single IPC call, but we chose to optimize the case where buffers are not created and avoid some complexity in the marshalling code. Change-Id: I097a7f6f40a3491e10f3f3742eab33999286c304
* frameworks/base: android_native_buffer_t -> ANativeWindowBufferIliyan Malchev2011-05-031-8/+8
| | | | | Change-Id: Idc2eabaa805bb6d308ebb315872623f28d428417 Signed-off-by: Iliyan Malchev <malchev@google.com>
* frameworks/base: make the ANativeWindow query() method constIliyan Malchev2011-05-031-2/+2
| | | | | | | query() does not modify the object's data, so it needs to be a const method Change-Id: I67c40a3c865461e6f1cc2193fd2d74286ff6ac8f Signed-off-by: Iliyan Malchev <malchev@google.com>
* 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