replicant-frameworks_native/services/surfaceflinger
Mathias Agopian abe815dd69 rework how we take screenshots for a CPU consumer
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
2013-03-19 22:22:21 -07:00
..
DisplayHardware Don't log an error on HWC1.1+ devices with no FB HAL 2013-03-19 11:22:57 -07:00
tests Surface can now be created only from an IGraphicBufferProducer 2013-03-12 18:45:09 -07:00
Android.mk Add BufferQueueInterposer and use it for virtual displays 2013-03-18 14:21:45 -07:00
Barrier.h
Client.cpp get rid of ISurface 2013-03-12 17:11:48 -07:00
Client.h get rid of ISurface 2013-03-12 17:11:48 -07:00
clz.cpp
clz.h implement: "Add an ANativeWindow API for SurfaceFlinger to suggest an optimal buffer orientation" 2011-07-19 15:24:46 -07:00
DdmConnection.cpp fix SurfaceFlinger DDMS debugging 2012-10-07 16:41:12 -07:00
DdmConnection.h add libsurfaceflinger_ddmconnection for PDK build 2012-08-31 20:08:33 -07:00
DisplayDevice.cpp Add DisplaySurface abstraction 2013-03-18 14:21:16 -07:00
DisplayDevice.h Add DisplaySurface abstraction 2013-03-18 14:21:16 -07:00
EventThread.cpp Minor cleanups/fixes before virtual display refactoring 2013-03-18 14:16:02 -07:00
EventThread.h Display events now always carry the display id they happened on 2012-09-21 14:20:35 -07:00
FrameTracker.cpp SurfaceFlinger: add win anim frame time tracking 2013-02-08 13:32:21 -08:00
FrameTracker.h SurfaceFlinger: add win anim frame time tracking 2013-02-08 13:32:21 -08:00
GLExtensions.cpp add support for [1974164] Be able to take a screen shot on the device 2010-09-24 14:56:39 -07:00
GLExtensions.h add support for [1974164] Be able to take a screen shot on the device 2010-09-24 14:56:39 -07:00
Layer.cpp get rid of purgatory and fix QueuesToWindowComposer query 2013-03-14 19:18:13 -07:00
Layer.h get rid of ISurface 2013-03-12 17:11:48 -07:00
LayerDim.cpp get rid of ISurface 2013-03-12 17:11:48 -07:00
LayerDim.h get rid of ISurface 2013-03-12 17:11:48 -07:00
MessageQueue.cpp one more step towards multiple display support 2012-07-10 14:29:27 -07:00
MessageQueue.h one more step towards multiple display support 2012-07-10 14:29:27 -07:00
MODULE_LICENSE_APACHE2
SurfaceFlinger.cpp rework how we take screenshots for a CPU consumer 2013-03-19 22:22:21 -07:00
SurfaceFlinger.h rework how we take screenshots for a CPU consumer 2013-03-19 22:22:21 -07:00
SurfaceFlingerConsumer.cpp libgui: disallow NULL Fence pointers 2013-02-12 18:15:38 -08:00
SurfaceFlingerConsumer.h Rename ISurfaceTexture and SurfaceTexture 2012-12-18 13:10:48 -08:00
SurfaceTextureLayer.cpp get rid of purgatory and fix QueuesToWindowComposer query 2013-03-14 19:18:13 -07:00
SurfaceTextureLayer.h get rid of purgatory and fix QueuesToWindowComposer query 2013-03-14 19:18:13 -07:00
Transform.cpp implement display projection clipping in h/w composer 2013-02-28 18:43:04 -08:00
Transform.h implement display projection clipping in h/w composer 2013-02-28 18:43:04 -08:00