summaryrefslogtreecommitdiffstats
path: root/libs/gui/SurfaceComposerClient.cpp
Commit message (Collapse)AuthorAgeFilesLines
* libgui: Enable -Weverything and -WerrorDan Stoza2015-03-181-5/+5
| | | | | | | | | | | | | Enables -Weverything and -Werror, with just a few exceptions for warnings we can't (or shouldn't need to) work around. Cherry pick of I034abec27bf4020d84af60d7acc1939c59986dd6 plus a couple of minor changes to CpuConsumer.cpp to make it work with a prior change: Uncomment CC_LOGV on line 46 Change C-style cast to static_cast on line 71 Change-Id: Iaec610477ea0122317b0578fb74caf2383d4cf08
* Enable clang for libui/libgui/surfaceflingerDan Stoza2014-12-041-2/+2
| | | | | | | | Enables clang and C++11 for libui/libgui/surfaceflinger, and eliminates all compile-time warnings. Change-Id: Ie237fdb5ae44f2bfcddaa884f9c65ec3f08ae50f (cherry picked from commit f10c46ef855b6410b20ebd8b1351d4d78d8eca8e)
* Replace IInterface::asBinder() with a staticMarco Nelissen2014-11-171-3/+3
| | | | | | | so we can do NULL checks again, and update calls to IInterface::asBinder() to use the new static version. Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a
* Update ScreenshotClient to take advantage of rotation in surfaceflinger's ↵Riley Andrews2014-09-091-4/+14
| | | | | | screencap api Change-Id: I836649d9d5cd5958ce34e47f26f4a36d2d05d24c
* Have VirtualDisplays send SF resize messages when resizingMichael Wright2014-07-301-0/+14
| | | | Change-Id: I76d15b22099a659450ec875836c9bf2b6584838f
* surfaceflinger: Replace blank/unblank with setPowerModePrashant Malani2014-06-051-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We replace the blank/unblank calls in surfaceFlinger with a more generic setPowerMode() routine. Some displays support different power modes (for example, with reduced color palettes). Depending on the use case we should be able to toggle these modes, so as to achieve incremental power savings. Initially, three power modes will be supported: - HWC_POWER_MODE_OFF - HWC_POWER_MODE_DOZE - HWC_POWER_MODE_NORMAL HWC_POWER_MODE_OFF will correspond to blanking the display, while HWC_POWER_MODE_NORMAL will correspond to unblanking. HWC_POWER_MODE_DOZE will put the display into a low power setting, if it is supported in hardware. If such a low power mode is not supported, it should be treated as a call to set the mode to HWC_POWER_MODE_NORMAL. As a consequence of adding the mPowerMode field, the mScreenAcquired is no longer required, and thus references to it are removed and replaced equivalent references to mPowerMode. We also add the glue code to connect the services invocation of setting a power mode and the HAL implementation in HWComposer. Bug: 13472578 Change-Id: I431595ecf16d2f2c94259272db3dd42f29636204 Signed-off-by: Prashant Malani <pmalani@google.com>
* SurfaceFlinger: Add sourceCrop to screenshotDan Stoza2014-05-231-9/+9
| | | | | | | | | Adds a sourceCrop Rect parameter to screenshot commands, which allows clients to capture only a portion of the screen instead of the whole screen. Bug: 15137922 Change-Id: I629447573cd34ffb96334cde7ba02490b9ea06d8
* Enable changing display configurationDan Stoza2014-05-051-3/+29
| | | | | | | | This allows querying and switching display device configurations through the ISurfaceComposer/SurfaceComposerClient interface. Bug: 14320401 Change-Id: I8c22165698950e5da32204c1c4da92122f91a715
* Adding render stats APIs to UiAutomation (framework native).Svetoslav2014-04-101-0/+23
| | | | | | bug:12927198 Change-Id: Ibb1c07f7d89e11281e5c1f27f412a29ac6f9c4ab
* Remove deprecated BufferQueue constructorDan Stoza2014-03-131-3/+4
| | | | | Bug: 13415624 Change-Id: I52f58a4d22296d9fc3cdbd4ad53eb10a785db3ce
* Allow disabling layer rotation during screenshotsDan Stoza2014-02-141-8/+12
| | | | | | | | Add the ability to ignore layers' transformation matrices during screenshot capture, which will allow the window manager to capture unrotated images for recents during the device rotation animation. Bug: 11805195 Change-Id: I854d87bc84ca06ef9a054a454af1c080ee66fbb8
* Allow "opaque" flag to be updatedAndy McFadden2014-01-291-1/+6
| | | | | | | | | Moves the "opaque layer" from Layer to Layer::State. This allows it to be updated as part of a transaction. Bug 12387406 Change-Id: I0a114ce6adf77cd12fb08f96e0691b76c475768d
* Add ISurfaceComposer::destroyDisplayJesse Hall2013-08-081-0/+9
| | | | | Bug: 10191053 Change-Id: Ia89286f95421344a60ffedaaca5825c4e3cd7f9e
* remove support for glReadPixels screenshot pathMathias Agopian2013-08-061-3/+2
| | | | | | | this was only needed on some chipset we're not supporting in KLP. Change-Id: I2e8fc07f135030bd61d2e241a8e426f1a4316425
* All consumers now take an IGraphicBufferConsumer instead of a BufferQueueMathias Agopian2013-08-061-3/+3
| | | | | | | | | | this means they only have access to the consumer end of the interface. we had a lot of code that assumed consumers where holding a BufferQueue (i.e.: both ends), so most of this change is untangling in fix that Bug: 9265647 Change-Id: Ic2e2596ee14c7535f51bf26d9a897a0fc036d22c
* log an error when dequeueBuffer gets a NULL FenceMathias Agopian2013-08-011-1/+1
| | | | | Bug: 9858745 Change-Id: If35d6a7d770bf0a42d55bc55880a9ddb721fcfd0
* always pass the BufferQueue explicitely to consumersMathias Agopian2013-07-121-1/+2
| | | | Change-Id: I883b0a7b19d8e722f9ab714ba6f49e658b02ca86
* make sure to unlock the screenshot's buffer on destructionMathias Agopian2013-03-261-0/+4
| | | | | | | this fixes a memory leak on various devices Bug: 8475134 Change-Id: I25924674c803a0cb22371a95c60664c36acb0340
* rework how we take screenshots for a CPU consumerMathias Agopian2013-03-191-29/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | We're not using IMemoryHeap as a transport anymore, instead we're providing a CpuConsumer and use the IGraphicBufferProducer version of the screenshot API. However, some GPU drivers don't support properly a GPU to CPU path, to work around this, we use a temporary BufferQueue on the server side for the GL rendering, and we use glReadPixels into the CpuConsumer (we're now using a CPU to CPU path which is always supported). Currently this "wrapping" is always performed, but it can be bypassed on devices that support the GPU to CPU path. This also addresses a DoS attack vector on SurfaceFlinger, where an application could consume all of SF's filedescriptors by creating a lot of screenshots in a row. Bug: 8390553 Change-Id: I9e81514c2a7711b9bb393f74305be7d2abe08f1c
* get rid of ISurfaceMathias Agopian2013-03-121-6/+9
| | | | | | | | | | | | ISurface was only used to get the IGraphicBufferProducer from a Layer. It's now replaced by a BBinder subclass / IBinder and is only used as a handle to the surface, to both refer to it and manage its life-time. Also cleaned-up a bit the ISurfaceComposer interface and "create layer" code path. Change-Id: I68d0e02d57b862cffb31d5168c3bc10cea0906eb
* rework screenshot API and implementationMathias Agopian2013-03-011-0/+11
| | | | | | | | | | | | | | | | | - SurfaceFlinger now supports to take a screenshot directly into an IGraphicBufferProducer - reimplement the IMemoryHeap screenshot on top of the above - reimplement LayerScreenshot such that its BufferQueue is directly used as the destination of the screenshot. LayerScreenshot is now a thin wrapper around Layer Bug: 6940974 Change-Id: I69a2096b44b91acbb99eba16f83a9c78d94e0d10
* Refactoring: Rename SurfaceTextureClient to SurfaceMathias Agopian2013-02-141-0/+1
| | | | Change-Id: Ibed34175ae273608393aaa5f0a7df207dc40d709
* get rid of Surface identity and tokenMathias Agopian2013-02-131-36/+34
| | | | | | we use the IBinder instead. Change-Id: I4aa0b58869ba43f19980013620051e5a261b062d
* Rename ISurfaceTexture and SurfaceTextureAndy McFadden2012-12-181-5/+6
| | | | | | | | | | The C++ class names don't match what the classes do, so rename ISurfaceTexture to IGraphicBufferProducer, and SurfaceTexture to GLConsumer. Bug 7736700 Change-Id: Ia03e468888025b5cae3c0ee1995434515dbea387
* Allow global transactions to nest.Jeff Brown2012-11-021-3/+24
| | | | | | | | | | | | | This change fixes a number of small glitches that can occur when multiple components in the same process are updating surfaces. One would expect that updates to disjoint sets of surfaces would not collide but this is not the case. The first component to close the global transaction causes all pending updates to be applied, including those that another component might not have finished setting up if it also had an open transaction at the same time. Change-Id: I99345958581abbe0e1e325a5bcba37e8941a313a
* SurfaceFlinger: add support for secure displaysJamie Gennis2012-10-221-5/+7
| | | | | | | | | This change adds support for displays that are not allowed to display surfaces with the eSecure flag set. All non-virtual displays are considered secure, while virtual displays have their secure-ness specified at creation time. Bug: 7368436 Change-Id: I81ad535d2d1e5a7ff78269017e85b111f0098500
* SurfaceFlinger: add animation transactionsJamie Gennis2012-10-151-1/+22
| | | | | | | | | | This change adds a transaction flag for WindowManager to indicate that a transaction is being used to animate windows around the screen. SurfaceFlinger will not allow more than one of these transactions to be outstanding at a time to prevent the animation "frames" from being dropped. Bug: 7353840 Change-Id: I6488a6e0e1ed13d27356d2203c9dc766dc6b1759
* Add blankDisplay/unblankDisplay to SurfaceComposerClient.Jeff Brown2012-10-081-0/+8
| | | | | Bug: 7309812 Change-Id: Ia401d642094a46c62f0d26c65da1d11341e203a1
* Revert "Compatibility work around for bad graphics driver dependency."Iliyan Malchev2012-09-271-9/+0
| | | | | | This reverts commit a50b51c03aca449920fc8581a738032a7bce7150 Change-Id: Ibdcd776a7f241dbb2475403ea04f939249774c41
* Plumb display name into SurfaceFlingerAndy McFadden2012-09-181-5/+5
| | | | | | | | | | The Surface createDisplay() call takes a display name for debugging. This change carries it through SurfaceFlinger and displays it in the "dumpsys SurfaceFlinger" output. Bug 7058158 Change-Id: I79f3474a8656ff1beb7b478e0dbf2c5de666118a
* Watch for SurfaceFlinger deathAndy McFadden2012-09-061-2/+37
| | | | | | | | | | | | | | | The ComposerService object wasn't watching for SurfaceFlinger restarts, which doesn't usually matter because the app framework restarts when SurfaceFlinger dies. However, mediaserver continues to run, which means its ComposerService object was trying to use a dead handle, and playback of DRM movies was failing. This adds a DeathRecipient listener and some logic to re-establish the SurfaceFlinger connection. Bug 6645813 Change-Id: I07581b881d3835601aa57d5358c8259d93bc4515
* display projection API now has a single function instead of 3Mathias Agopian2012-09-041-43/+17
| | | | Change-Id: I9bf46d372b77d547486d4bbe6f1953ec8c65e98f
* Revert "A vendor ril depends on a native screen shot code."Wink Saville2012-08-301-8/+0
| | | | | | This reverts commit 9b5782baf0a8a2d7afc7129453beb5df7abe7650. A new ril for toro, hack no longer needed.
* A vendor ril depends on a native screen shot code.Wink Saville2012-08-281-0/+8
| | | | | | | Add a temporary shim until the vendor fixes the ril. Bug: 7073467 Change-Id: Ia95a58bd90677c03406c988d1c29ae785f8662f2
* Compatibility work around for bad graphics driver dependency.Jeff Brown2012-08-271-0/+9
| | | | | | | | | | | This is a compatibility shim for one product whose drivers are depending on SurfaceComposerClient::getDisplayInfo( int, DisplayInfo*) when it really shouldn't. Revert this patch when the problem has been resolved. Bug: 7065398 Change-Id: I6542691b81fd1b1e1d79500a62e82d40a3d51db7
* Remove unused "layer" argument from show().Jeff Brown2012-08-271-1/+1
| | | | Change-Id: I8944a9f4a27c330b11e5e837c69b88c8f84145ba
* Banish DisplayID from the SurfaceFlinger API.Jeff Brown2012-08-271-33/+20
| | | | | | | | | | | | | | | Use only display tokens in the API to refer to new displays. Don't require the caller to specify the display when creating a surface (since in general a surface could be shown on any display). This is intended to be a minimum change just to update the API. Note that SurfaceFlinger still uses DisplayID in a few places internally that might cause some features not to work properly when there are multiple displays (LayerScreenshot, for example). Change-Id: I3d91eec2da406eefd97bcd53655d403ad865a7e6
* display states can't share the dirty flagsMathias Agopian2012-08-161-3/+3
| | | | Change-Id: Ifade9f2f1a0df9a36aede77a6cf5eee4be534f98
* make multi-display more realMathias Agopian2012-08-101-35/+126
| | | | | | | - displays are represented by a binder on the client side - c++ clients can now create and modify displays Change-Id: I203ea5b4beae0819d742ec5171c27568f4e8354b
* libgui includes refactoringMathias Agopian2012-08-101-14/+14
| | | | Change-Id: I1d24ec17f5003ec2abab5f7472daaff4cc4cc2d3
* get rid of the shared-memory control blockMathias Agopian2012-07-251-65/+1
| | | | Change-Id: If814060aca1d2ff2619d4adcd57296983d207f7f
* add a layerStack attribute to Layers.Mathias Agopian2012-07-241-0/+17
| | | | | | | this attribute can be set through a regular transaction using SurfaceComposerClient (just like any other attribute, eg: position or size) Change-Id: I701a47c677ea6442ca713728a93335328cd2b172
* update SF binder protocol to support setting display attributesMathias Agopian2012-07-241-3/+7
| | | | | | | | | no change of functionality -- the old behavior is implemented on top of this new protocol. this new protocol will allow, eventually, to pass informations about displays and layer stacks. Change-Id: Ic6c2295e61ec8ecbc8ce01ab7664e35d928202fc
* Remove freeze(), unfreeze() and setFreezeTint().Jeff Brown2012-07-161-30/+0
| | | | | | This is all dead code. Change-Id: I646673aac793a6ec45021c370a2450f0ea4fbcce
* Remove freezeDisplay(), which is no-op.Jeff Brown2012-07-161-14/+0
| | | | Change-Id: I2b70249a1545636fd6d98b58057b22f9529cad21
* SurfaceFlinger: add a crop to the layer stateJamie Gennis2012-05-111-0/+17
| | | | | | | | | 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
* fix libgui header locationMathias Agopian2012-02-271-7/+6
| | | | Change-Id: Iec71706cdd4f29c6904993648ce873e83ef9cafe
* split ComposerService out of SurfaceComposerClient.hMathias Agopian2011-11-281-0/+1
| | | | Change-Id: I1eb691f7ca263d5895d871ab675bb5826e0323c6
* SurfaceFlinger: make sync transactions explicitJamie Gennis2011-10-141-8/+25
| | | | | | | This change enables a layer or orientation update transaction sent to SurfaceFlinger to explicitly request a synchronous transaction. Change-Id: I97cbba610c13679849f66114b216fa6dbf12f2a9
* SurfaceFlinger: update orientation via transactionsJamie Gennis2011-10-111-14/+25
| | | | | | | | | | | This change merges the ISurfaceComposer::setOrientation functionality into ISurfaceComposer::setTransactionState. It enables the window manager to atomically update both the display orientation and the position and size of the windows in a single transaction with SurfaceFlinger. Bug: 5439574 Change-Id: I18a8ccc564d7d760ef8afb2d015ccdb7a7963900