Commit Graph

48306 Commits

Author SHA1 Message Date
Mathias Agopian
d839908ecf am 504e1f26: Merge "initialize planeAlpha (to 0xFF) for the FB_TARGET" into jb-mr2-dev
* commit '504e1f2638f6a5d7ad7ce66a89eaaaba15b452db':
  initialize planeAlpha (to 0xFF) for the FB_TARGET
2013-03-22 00:02:53 +00:00
Mathias Agopian
504e1f2638 Merge "initialize planeAlpha (to 0xFF) for the FB_TARGET" into jb-mr2-dev 2013-03-21 23:58:39 +00:00
Mathias Agopian
70a6e88dbd initialize planeAlpha (to 0xFF) for the FB_TARGET
Bug: 8422625
Change-Id: I7b72456c2e01ed92e675cc1bfa0cfd0d2ce5064e
2013-03-21 16:25:12 -07:00
Jamie Gennis
0fa7ac9bec am 43122e7e: atrace: use creat instead of truncate
* commit '43122e7e672eb170334a4467dd41cf4bd545bae5':
  atrace: use creat instead of truncate
2013-03-21 21:15:05 +00:00
Jamie Gennis
43122e7e67 atrace: use creat instead of truncate
Change-Id: Ie25c704f33c419c0c542249ae2841393862df0ab
2013-03-21 14:06:57 -07:00
Eino-Ville Talvala
a010749b41 am aaebffd5: Merge "CpuConsumer: Properly track acquired buffers" into jb-mr2-dev
* commit 'aaebffd52f1bfa3d239bba0d60b699c01c6d791c':
  CpuConsumer: Properly track acquired buffers
2013-03-21 16:40:18 +00:00
Eino-Ville Talvala
aaebffd52f Merge "CpuConsumer: Properly track acquired buffers" into jb-mr2-dev 2013-03-21 16:39:14 +00:00
Ramanan Rajeswaran
eda14c1bef am ac006439: Merge "Revert "Revert "Change SurfaceControl setPosition to take floats""" into jb-mr2-dev
* commit 'ac006439bb635cd99d8dcbefe95fa680e21519b5':
  Revert "Revert "Change SurfaceControl setPosition to take floats""
2013-03-21 15:53:56 +00:00
Ramanan Rajeswaran
ac006439bb Merge "Revert "Revert "Change SurfaceControl setPosition to take floats""" into jb-mr2-dev 2013-03-21 15:52:49 +00:00
Ramanan Rajeswaran
d6480c020b Revert "Revert "Change SurfaceControl setPosition to take floats""
This reverts commit bbb57f3331

Change-Id: Ib8f039f530d6b8175b5205c6c0008b135d4001a2
2013-03-21 15:49:59 +00:00
Mathias Agopian
890b345f06 am 7c1a487b: fix build. update test to new API
* commit '7c1a487ba8c0a3b591a77e2ddcb33ef9bdfaff64':
  fix build. update test to new API
2013-03-20 22:58:52 +00:00
Mathias Agopian
7c1a487ba8 fix build. update test to new API
Change-Id: I31ca84c85edff3e2ff90c554769e058110f27d49
2013-03-20 15:56:04 -07:00
Mathias Agopian
89016cbf4f am ff7c2342: Merge "rework how we take screenshots for a CPU consumer" into jb-mr2-dev
* commit 'ff7c2342e246696defa121a984d9731d000adeaf':
  rework how we take screenshots for a CPU consumer
2013-03-20 22:16:56 +00:00
Mathias Agopian
ff7c2342e2 Merge "rework how we take screenshots for a CPU consumer" into jb-mr2-dev 2013-03-20 22:14:56 +00:00
Jeff Sharkey
93628db30a am a6c1ab52: Merge "Move screenshots near beginning of dumpstate." into jb-mr2-dev
* commit 'a6c1ab52e30fc63c8822e1f0cc6c5aea6328a69b':
  Move screenshots near beginning of dumpstate.
2013-03-20 19:12:44 +00:00
Jeff Sharkey
a6c1ab52e3 Merge "Move screenshots near beginning of dumpstate." into jb-mr2-dev 2013-03-20 19:09:45 +00:00
Jeff Tinker
e507d46e72 am 30041bd3: Merge "Updated MediaDrm API based on review input." into jb-mr2-dev
* commit '30041bd3a487c3bfe45a5b802a0d3443cfcc0c51':
  Updated MediaDrm API based on review input.
2013-03-20 16:53:16 +00:00
Jeff Tinker
30041bd3a4 Merge "Updated MediaDrm API based on review input." into jb-mr2-dev 2013-03-20 16:47:34 +00:00
The Android Open Source Project
0371fd021f Reconcile with jb-mr2-release - do not merge
Change-Id: I9b1d766e6519a720cee8327d1ec71d9f69dd7387
2013-03-20 09:32:41 -07:00
The Android Automerger
dbff8227e2 merge in jb-mr2-release history after reset to jb-mr2-dev 2013-03-20 05:55:54 -07:00
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
Mathias Agopian
656a6780b5 am 9cd766a5: disable RefBase consistency checks (NDEBUG)
* commit '9cd766a517caeb58669722fad7fdf623a8c1b83c':
  disable RefBase consistency checks (NDEBUG)
2013-03-20 00:42:21 +00:00
Mathias Agopian
9cd766a517 disable RefBase consistency checks (NDEBUG)
Bug: 8328715
Change-Id: Ib57646ff909fd8744610f37f3b50d90d884dff31
2013-03-19 17:36:57 -07:00
Mathias Agopian
dd3fcd2e58 am 4e37ddff: Fix a crasher with RefBase debugging and vectors of wp<>
* commit '4e37ddff43784a5a784beb4b62ea3f3136e1634b':
  Fix a crasher with RefBase debugging and vectors of wp<>
2013-03-20 00:27:46 +00:00
Mathias Agopian
4e37ddff43 Fix a crasher with RefBase debugging and vectors of wp<>
background:
we have some code to fix-up the IDs of references when
using RefBase's DEBUG_REFS when those refs are managed by
arrays wp<> or sp<> (this is because wp<> / sp<> don't have
a trivial ctor when DEBUG_REFS is enabled, and Vector
treats them as trivial for obvious performance reasons)

this is complicated by the fact that we don't want to have
to recompile everything when enabling DEBUG_REFs (i.e.: the
Vector code cannot know wheter it's enabled or not for its
template stuff).

problem:
there was a bug in the fix-up code for wp<> which was trying
to access the weakref_impl from the RefBase* however, this was
moronic since RefBase could have been destroyed if there wasn't
any more strong refs -- and this happned. Instead we need to get
the weakref_impl directly from the wp<>

Change-Id: Ie16e334204205fdbff142acb9faff8479a78450b
2013-03-19 16:41:56 -07:00
Mathias Agopian
364a1f9578 am ca987c87: Merge "A few tweaks to RefBase debugging" into jb-mr2-dev
* commit 'ca987c877549b0d5472e91ded98f3ba6fea8a96d':
  A few tweaks to RefBase debugging
2013-03-19 23:02:47 +00:00
Mathias Agopian
ca987c8775 Merge "A few tweaks to RefBase debugging" into jb-mr2-dev 2013-03-19 23:00:40 +00:00
Jeff Sharkey
5a93003d3f Move screenshots near beginning of dumpstate.
Bug: 8420215
Change-Id: I6adffd1182ed8f99b8d11d43785a4eb4a388ceb5
2013-03-19 15:19:48 -07:00
Jesse Hall
4af2b42b58 am ef64b75a: Don\'t log an error on HWC1.1+ devices with no FB HAL
* commit 'ef64b75a936ffd194673dbce6766995f86b42ba9':
  Don't log an error on HWC1.1+ devices with no FB HAL
2013-03-19 20:49:09 +00:00
Jesse Hall
ef64b75a93 Don't log an error on HWC1.1+ devices with no FB HAL
Change-Id: I015e5a1a1f926181e51f82525f69beff71bd70cd
2013-03-19 11:22:57 -07:00
Jesse Hall
88f70a2167 am fae23b87: Merge changes I61ae54f3,I57cb668e,I7a3f1e1a,Id28a2f9b into jb-mr2-dev
* commit 'fae23b8757a6e1b70997db28a2eaf34f9ddc9b84':
  Add BufferQueueInterposer and use it for virtual displays
  Add DisplaySurface abstraction
  Fix argument types in IGraphicBufferProducer methods
  Minor cleanups/fixes before virtual display refactoring
2013-03-19 17:47:30 +00:00
Jesse Hall
fae23b8757 Merge changes I61ae54f3,I57cb668e,I7a3f1e1a,Id28a2f9b into jb-mr2-dev
* changes:
  Add BufferQueueInterposer and use it for virtual displays
  Add DisplaySurface abstraction
  Fix argument types in IGraphicBufferProducer methods
  Minor cleanups/fixes before virtual display refactoring
2013-03-19 17:45:29 +00:00
The Android Automerger
7d2c10419a merge in jb-mr2-release history after reset to jb-mr2-dev 2013-03-19 05:55:29 -07:00
Mathias Agopian
19437cb84c A few tweaks to RefBase debugging
- stacks are now saved in /data/debug which must be
  created and writable by the user.

- removed "always fatal" DEBUG_REFS option, it wasn't
  really needed.

- DEBUG_REFS_ENABLED_BY_DEFAULT is not the default anymore
  (usually people want to target which refs they're tracking)

Change-Id: I37fae72e9dacde6ce1fa8f7dbe2bc01b1a1b95e5
2013-03-18 22:59:40 -07:00
Jamie Gennis
0bb2d18a82 am 79fb99d0: Merge "atrace: add support for tracing kernel functions" into jb-mr2-dev
* commit '79fb99d0dea4d301d1bf25273c6af4907ca124bc':
  atrace: add support for tracing kernel functions
2013-03-18 21:56:43 +00:00
Jamie Gennis
79fb99d0de Merge "atrace: add support for tracing kernel functions" into jb-mr2-dev 2013-03-18 21:54:44 +00:00
Jesse Hall
80e0a397a4 Add BufferQueueInterposer and use it for virtual displays
BufferQueueInterposer allows a client to tap into a
IGraphicBufferProducer-based buffer queue, and modify buffers as they
pass from producer to consumer. VirtualDisplaySurface uses this to
layer HWC composition on top of GLES composition before passing the
buffer to the virtual display consumer.

Bug: 8384764
Change-Id: I61ae54f3d90de6a35f4f02bb5e64e7cc88e1cb83
2013-03-18 14:21:45 -07:00
Jesse Hall
99c7dbb249 Add DisplaySurface abstraction
DisplayDevice now has a DisplaySurface instead of using
FramebufferSurface directly. FramebufferSurface implements
DisplaySurface, and so does the new VirtualDisplaySurface class.
DisplayDevice now always has a surface, not just for virtual displays.

In this change VirtualDisplaySurface is just a stub; buffers still go
directly from GLES to the final consumer.

Bug: 8384764
Change-Id: I57cb668edbc6c37bfebda90b9222d435bf589f37
2013-03-18 14:21:16 -07:00
Jesse Hall
4c00cc1114 Fix argument types in IGraphicBufferProducer methods
Bug: 8384764
Change-Id: I7a3f1e1a0584a70af04f9eafef900505389d2202
2013-03-18 14:16:02 -07:00
Jesse Hall
7adb0f8a9f Minor cleanups/fixes before virtual display refactoring
None of these should change behavior, except for removing some
incorrect log messages when using a virtual display.

- HWComposer::getAndResetReleaseFenceFd() checks the HWC version, so
  no need to do that in the DisplayDevice::onSwapBuffersCompleted().
  However, it should check that mFramebufferSurface is not NULL like
  it is for virtual displays.
- Comment that FramebufferSurface::dump() overrides the non-virtual
  ConsumerBase::dump(), and fix it so the right thing happens
  regardless of the static type of the pointer/reference the callee
  has. FramebufferSurface::dump() could be removed right now, but I'd
  need to bring it back in a later change.
- Use the right enum for validating display type ids.
- Don't try to send hotplug events for virtual displays.
- Mark virtual displays as connected so HWComposer::prepare() doesn't
  think something is wrong when it gets a non-NULL layer list.
- Remove unused FramebufferSurface methods.

Bug: 8384764
Change-Id: Id28a2f9be86b45f4bb7915fdf7752157035f4294
2013-03-18 14:16:02 -07:00
Jamie Gennis
e9b8cfb632 atrace: add support for tracing kernel functions
This change adds support for tracing specific kernel function calls using the
function_graph tracer.  It adds a '-k' option to atrace that accepts a comma
separated list of kernel function names for which tracing will be enabled.

Change-Id: I872b2f1d474b8ebb904053853fc8cf8c0a98089c
2013-03-18 13:56:18 -07:00
The Android Automerger
152eb67787 merge in jb-mr2-release history after reset to jb-mr2-dev 2013-03-18 05:55:58 -07:00
Jesse Hall
df608eb15d am ce7e2781: Merge "Add Vector::resize()" into jb-mr2-dev
* commit 'ce7e278151d268f3cf55bcecd05f6be8c7e82e0f':
  Add Vector::resize()
2013-03-17 16:18:34 +00:00
Mathias Agopian
df6c6e97b5 am 041a0752: don\'t allow screenshots without the READ_FRAMEBUFFER permission
* commit '041a075262ef5fc886e46fd4eec3dd79ee2e60c0':
  don't allow screenshots without the READ_FRAMEBUFFER permission
2013-03-17 16:18:34 +00:00
Jesse Hall
ce7e278151 Merge "Add Vector::resize()" into jb-mr2-dev 2013-03-16 03:23:13 +00:00
Mathias Agopian
041a075262 don't allow screenshots without the READ_FRAMEBUFFER permission
the recent screenshot rework allowed the older screenshot
interface to work without that permission

Change-Id: I6c4743f4591c81106e3b823d55a055f7b4907de1
2013-03-15 18:39:16 -07:00
Mathias Agopian
0714d09e47 am 7670d3cb: Merge "get rid of purgatory and fix QueuesToWindowComposer query" into jb-mr2-dev
* commit '7670d3cb2b5d38c60135f34a2446e1ae809d1b32':
  get rid of purgatory and fix QueuesToWindowComposer query
2013-03-16 01:16:22 +00:00
Mathias Agopian
7670d3cb2b Merge "get rid of purgatory and fix QueuesToWindowComposer query" into jb-mr2-dev 2013-03-16 01:14:35 +00:00
Mathias Agopian
28e89fed09 am a493be58: don\'t capture hidden layers in screenshots
* commit 'a493be5825d15f6a94d1afb5910db075a2a7abc1':
  don't capture hidden layers in screenshots
2013-03-15 23:16:30 +00:00
Mathias Agopian
a493be5825 don't capture hidden layers in screenshots
Bug: 8389956
Change-Id: I9ed836395258732c743c6fd44092bd01020dde13
2013-03-15 16:08:10 -07:00