summaryrefslogtreecommitdiffstats
path: root/libs/gui/SurfaceTextureClient.cpp
Commit message (Collapse)AuthorAgeFilesLines
* libgui: Add support to update buffer geometry.Ramkumar Radhakrishnan2013-03-101-0/+26
| | | | | | | | | Add native window properties NATIVE_WINDOW_UPDATE_BUFFERS_GEOMETRY to the perform function of SurfaceTextureClient and SurfaceTexture to update the width, height and format of the buffer dynamically from the client before queue buffer call. Change-Id: I62447fcf523b507d534085cd0835f55a978c4ead
* Add support for custom buffer sizes.Ramkumar Radhakrishnan2013-03-101-0/+38
| | | | | | | | Add native window properties NATIVE_WINDOW_SET_BUFFERS_SIZE to the perform function of SurfaceTextureClient to set the user defined size of graphic buffers. Change-Id: I1dc2203990a3641fbb9ddab9a86f7e9017f05270
* Add Fence::waitForever which logs a warning timeout, and use itJesse Hall2012-10-021-5/+8
| | | | | Bug: 7217641 Change-Id: If0c1a613ead307c4045a47824174bf40c72bc7d7
* resolved conflicts for merge of 21938749 to jb-mr1-devJean-Baptiste Queru2012-08-201-6/+10
|\ | | | | | | Change-Id: I17da10797736f3772a143e2015fe25df0bb3eb3f
| * Fix error trap in SurfaceTexture ClientSteve Critchlow2012-07-101-6/+10
| | | | | | | | | | | | | | | | | | There was an issue in Surface::lock where failure to lock a surface resulted in two bad things happening: - success was returned to the caller (it was apparently locked). - an uninitialised pointer was returned as the buffer. Change-Id: I8b0df81400e0fa0542a8bb993d76923ac96b686e
* | Pass fences with buffers from SurfaceTextureClientJesse Hall2012-06-301-16/+7
| | | | | | | | Change-Id: I09b49433788d01e8b2b3684bb4d0112be29538d3
* | Return fence to client in dequeuBufferJesse Hall2012-06-281-5/+8
| | | | | | | | Change-Id: Ic19750793ad993f0e85391f3cabd743ba565d4c9
* | Pass fences from BufferQueue to SurfaceTextureClientJesse Hall2012-06-211-1/+11
| | | | | | | | | | | | | | | | | | | | 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
* | Update ANativeWindow clients for syncJamie Gennis2012-06-201-74/+127
|/ | | | | | | 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
* libgui: remove setPostTransformCropJamie Gennis2012-05-141-49/+2
| | | | | | | | This change removes the setPostTransformCrop function from SurfaceTextureClient. It also includes a small logging fix in BufferQueue. Bug: 6299171 Change-Id: Ifd0ed05b95dad6085e7a8267fda4d69b76ea3bad
* libgui: improve some logging and dumpingJamie Gennis2012-05-101-3/+6
| | | | | | | | | | 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
* libgui: Add support for post-xform crops.Jamie Gennis2012-05-081-30/+52
| | | | | | | | This change adds support for specifying a crop rectangle to a SurfaceTextureClient that is in post-transformed coordinate space. Change-Id: I247901de343e71b32850f7ae3bac62dfa612ad3d Bug: 6299171
* libgui: Add plumbing for active rectangleJamie Gennis2012-04-241-2/+28
| | | | | | | | This change adds the plumbing to SurfaceTextureClient, BufferQueue, and SurfaceTexture to get the active rectangle passed to the ANativeWindow to the buffer consumer. Change-Id: I35da0889b266327ebb079b6a7136fa3e2e8b00e6
* add a way to query whether an ANativeWindow consumer is running ahead of the ↵Mathias Agopian2012-04-231-11/+33
| | | | | | producer Change-Id: Ibccfa1feb56db2ab11f0c0934ce2d570a2b65ae2
* update the binder protocol for connect to match that of queueBufferMathias Agopian2012-04-231-2/+3
| | | | | | | indeed, connect and queueBuffer return the same data, so it's easier to have them use the same protocol. Change-Id: I4f9fa3be0a80c9ab0a7a4039b282ae843aab02e1
* s/w rendered apps can now use n-buffering (n>2)Mathias Agopian2012-04-131-7/+21
| | | | | Bug: 6311881 Change-Id: I6e52e281e8d432430aad011f6d9dcf35d7b4ac7d
* Enabled cropping support in SurfaceTextureDaniel Lam2012-04-121-0/+1
| | | | | | | | | SurfaceTexture will modify the crop rect so it matches the desired output aspect ratio when the scaling mode is NATIVE_WINDOW_SCALING_MODE_CROP. Added a test for this new scaling mode. Change-Id: I60f24dcbc294b65cd10a393d9e27d40f07d27bb6
* SurfaceTextureClient: support for application buffer dimensionsMichael I. Gold2012-04-111-3/+34
| | | | | | | | | Add a new API native_window_set_buffers_user_dimensions to allow native applications to override the native window size for the default buffer size. This has lower precedence than the existing native_window_set_buffers_dimensions and allows the two to co-exist. Change-Id: Ie73590e1c94ef0dadbce500bd0941dfabbcace3c
* use in/out structures for queueBuffer() IPCMathias Agopian2012-04-101-3/+6
| | | | Change-Id: Ie125df2444b62a9a2200586a717dca268852afc9
* BufferQueue returns proper code on acquireDaniel Lam2012-04-091-17/+0
| | | | | | | Also removed unnecessary debug messages from SurfaceTextureClient. Change-Id: I291897a44170142f9d42a007b008823fad4683e0
* reduce IPC with BufferQueueMathias Agopian2012-03-301-22/+29
| | | | | | | | collapse setCrop, setTransform and setScalingMode to queueBuffer() this ends up simplifying things quite a bit and reducing the numnber of IPC needed per frame. Change-Id: I3a13c07603abe4e76b8251e6380b107fde22e6d9
* remove dependency of EGL on ndk headerMathias Agopian2012-03-231-0/+3
| | | | Change-Id: Ia6e489b5b4f028864bdf54923e81f604710dd8ad
* SurfaceTexture: Fully refactored from BufferQueueDaniel Lam2012-03-131-0/+8
| | | | | | SurfaceTexture and BufferQueue are separate objects. Change-Id: I230bc0ae6f78d0f9b2b5df902f40ab443ed5a055
* Add tracing to various graphics components.Jamie Gennis2012-02-271-0/+14
| | | | | | | This change adds ATRACE call tracing to BufferQueue, SurfaceTextureClient, SurfaceTexture, SurfaceFlinger, Layer, and EGL. Change-Id: I9d75ed26f5a3f0d1af635da38289520134cfbbb7
* fix libgui header locationMathias Agopian2012-02-271-4/+4
| | | | Change-Id: Iec71706cdd4f29c6904993648ce873e83ef9cafe
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-081-15/+15
| | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
* Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGESteve Block2012-01-061-1/+1
| | | | | | | See https://android-git.corp.google.com/g/157065 Bug: 5449033 Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
* Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGESteve Block2012-01-031-3/+3
| | | | | | | See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
* split ComposerService out of SurfaceComposerClient.hMathias Agopian2011-11-281-0/+2
| | | | Change-Id: I1eb691f7ca263d5895d871ab675bb5826e0323c6
* am d0df44b5: am 4d71053b: Merge "attempt to fix bug 5313580" into ics-mr1Mathias Agopian2011-11-181-0/+6
|\ | | | | | | | | * commit 'd0df44b5c979e00a19187cea35768ba26557e447': attempt to fix bug 5313580
| * attempt to fix bug 5313580Mathias Agopian2011-11-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGESteve Block2011-10-261-17/+17
|/ | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
* SurfaceTexture: free buffers when disconnect failsJamie Gennis2011-10-181-1/+1
| | | | | | | | | This change makes SurfaceTextureClient free its references to all the buffers even when the disconnect binder call to the SurfaceTexture fails. Bug: 5384823 Change-Id: Iad787fbae5fda4769546fd52276e4e4030c62be6
* Error check in queuebuffer in SurfaceTextureClientPannag Sanketi2011-09-021-2/+5
| | | | | | | In queuebuffer, if the surfacetexture returns an error, surfacetextureclient should check for that and pass on the error. Change-Id: Ie6d70e779fac0702f372eb4df5ecb655280875ee
* make sure to re-initialize SurfaceTexture to its default state on disconnectMathias Agopian2011-08-251-2/+9
| | | | | | | this caused problems where the NavigationBar would disapear or be drawn in the wrong orientation. Change-Id: I083c41338db83a4afd14f427caec2f31c180d734
* SurfaceTexture: fix queues-to-composerJamie Gennis2011-08-171-1/+11
| | | | | | | | | | | This change fixes the NATIVE_WINDOW_QUEUES_TO_WINDOW_COMPOSER query of Surface and SurfaceTextureClient. Surface now uses the inherited SurfaceTextureClient implementation of this query. SurfaceTextureClient now queries SurfaceFlinger to determine whether buffers that are queued to its ISurfaceTexture will be sent to SurfaceFlinger (as opposed to some other process). Change-Id: Iff187e72f30d454229f07f896b438198978270a8
* return correct value from query after connecting a surfaceMathias Agopian2011-08-081-1/+2
| | | | | | | | | | the first time a surface was connected, the values returned by query NATIVE_WINDOW_DEFAULT_{WIDTH|HEIGHT} and NATIVE_WINDOW_TRANSFORM_HINT were wrong until a call to queueBuffer was performed. Bug: 5137366, 5121607 Change-Id: I7ac6b5b0daa876638f6bed7c20f286a6e6d984f6
* connect/disconnect is now called from our EGL wrapperMathias Agopian2011-08-011-2/+8
| | | | | | | | | | | the original connect/disconnect hooks are deprecated and replace by api_connect/api_disconnect. the original hooks are no no-ops. api_connect/api_disconnect is now only called from the android framework. Bug: 5057915 Change-Id: I8ca64cd1acd6cabf915bf54689ec2e5f6dfa495a
* remove dead code and member variables.Mathias Agopian2011-07-251-6/+0
| | | | | | also fix some comments and improve debugging logs. Change-Id: I83e55309f306332b59e1ec46104c4a7fffbf3c97
* SurfaceTexture: add the abandon method.Jamie Gennis2011-07-221-4/+5
| | | | | | | | 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
* Merge changes I799532f7,I5cffa6ebJamie Gennis2011-07-221-3/+0
|\ | | | | | | | | | | * changes: SurfaceTexture: fix a comment SurfaceTexture: remove getAllocator
| * SurfaceTexture: remove getAllocatorJamie Gennis2011-07-211-3/+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
* | Fix a few issues with NATIVE_WINDOW_TRANSFORM_HINTMathias Agopian2011-07-211-0/+3
|/ | | | | | | | | - fixed uninitialized variable - set hint to indentity when transform is too complex - make sure FrameBufferNativeWindow doesn't fail on needed perform commands Bug: 4487161 Change-Id: I7cb2b0869b72404732eca7cb2d145ff669e2ed9b
* implement: "Add an ANativeWindow API for SurfaceFlinger to suggest an ↵Mathias Agopian2011-07-191-14/+26
| | | | | | | optimal buffer orientation" Bug: 4487161 Change-Id: I883f34efe542c2a566d04966f873374f40c50092
* use SurfaceTexture new scaling mode in SFMathias Agopian2011-07-191-1/+1
| | | | | | | SF now obeys SurfaceTexture's scaling mode instead of inferring it from the buffer's size Change-Id: I4d50e9851abedd7e64bfcfc8af9eefb9fb668529
* Add set_scaling_mode() to ANativeWindow.Mathias Agopian2011-07-191-0/+20
| | | | | | | 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-33/+224
| | | | | | | | | | 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-141-30/+7
|\ | | | | | | | | | | * changes: SurfaceTexture: make (dis)connect into an IPC SurfaceTexture: add support for new connect values
| * SurfaceTexture: make (dis)connect into an IPCJamie Gennis2011-07-141-36/+7
| | | | | | | | | | | | | | | | 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
| * SurfaceTexture: add support for new connect valuesJamie Gennis2011-07-141-0/+6
| | | | | | | | | | | | | | This change adds support to SurfaceTextureClient for the new enum values that can be passed to the ANativeWindow connect call. Change-Id: I8c15418909e43a15673a9b22a5eb40df6923b273