summaryrefslogtreecommitdiff
path: root/opengl/tests
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2013-03-19 22:22:21 -0700
committerMathias Agopian <mathias@google.com>2013-03-19 22:22:21 -0700
commitabe815dd6978b718c04f6e22e1a893d2b51d11a1 (patch)
treeacef7520d6c36ec59192321ce8632b70a58724ab /opengl/tests
parent9cd766a517caeb58669722fad7fdf623a8c1b83c (diff)
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
Diffstat (limited to 'opengl/tests')
0 files changed, 0 insertions, 0 deletions