Merge "A few tweaks to RefBase debugging" into jb-mr2-dev
am ca987c87: Merge "A few tweaks to RefBase debugging" into jb-mr2-dev

* commit 'ca987c877549b0d5472e91ded98f3ba6fea8a96d':
  A few tweaks to RefBase debugging
am 364a1f95: am ca987c87: Merge "A few tweaks to RefBase debugging" into jb-mr2-dev

* commit '364a1f95786746118d62c90279aa3dd8eb93db8d':
  A few tweaks to RefBase debugging
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
am 4e37ddff: Fix a crasher with RefBase debugging and vectors of wp<>

* commit '4e37ddff43784a5a784beb4b62ea3f3136e1634b':
  Fix a crasher with RefBase debugging and vectors of wp<>
disable RefBase consistency checks (NDEBUG)

Bug: 8328715
Change-Id: Ib57646ff909fd8744610f37f3b50d90d884dff31
am 9cd766a5: disable RefBase consistency checks (NDEBUG)

* commit '9cd766a517caeb58669722fad7fdf623a8c1b83c':
  disable RefBase consistency checks (NDEBUG)
am dd3fcd2e: am 4e37ddff: Fix a crasher with RefBase debugging and vectors of wp<>

* commit 'dd3fcd2e583f5aff7ef390442fe4ed6395d4cc4c':
  Fix a crasher with RefBase debugging and vectors of wp<>
am 656a6780: am 9cd766a5: disable RefBase consistency checks (NDEBUG)

* commit '656a6780b5714c8667f604d7925729325d1cbcef':
  disable RefBase consistency checks (NDEBUG)
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
merge in jb-mr2-release history after reset to jb-mr2-dev
merge in master-release history after reset to master
Reconcile with jb-mr2-release - do not merge

Change-Id: I9b1d766e6519a720cee8327d1ec71d9f69dd7387
am 0371fd02: (-s ours) Reconcile with jb-mr2-release - do not merge

* commit '0371fd021f2f445b4041dc38f91ec25f10253455':
  am 7212ff29: am 20e154f1: Merge "Second try at adding a compatibility symbol for the MemoryBase constructor."
  size IMemoryHeap properly for screenshots
Merge "Updated MediaDrm API based on review input." into jb-mr2-dev
am 30041bd3: Merge "Updated MediaDrm API based on review input." into jb-mr2-dev

* commit '30041bd3a487c3bfe45a5b802a0d3443cfcc0c51':
  Updated MediaDrm API based on review input.
am e507d46e: am 30041bd3: Merge "Updated MediaDrm API based on review input." into jb-mr2-dev

* commit 'e507d46e72f85723f5443b5607e2828b016e657a':
  Updated MediaDrm API based on review input.
Release virtual display buffer immediately after HWC set

Previously we only queued a virtual display buffer to the sink when
the next frame was about to be displayed. This may delay the "last"
frame of an animation indefinitely. Now we queue the buffer as soon as
HWC set() returns and gives us the release fence.

Bug: 8384764
Change-Id: I3844a188e0f6ef6ff28f3e11477cfa063a924b1a
Merge "Move screenshots near beginning of dumpstate." into jb-mr2-dev
am a6c1ab52: Merge "Move screenshots near beginning of dumpstate." into jb-mr2-dev

* commit 'a6c1ab52e30fc63c8822e1f0cc6c5aea6328a69b':
  Move screenshots near beginning of dumpstate.