frameworks/base: tilerendering with fbo boundaries

1)tilerendering support when rendertarget switches
2)removed few rendering target switches to improve performance

Change-Id: I42c76e201537bd989631e11b0227ebcdc980f38b

Conflicts:

	libs/hwui/OpenGLRenderer.cpp
libstagefright: Fix for audio fail issue during continuous BT switching

- During playback, when BT is enabled and disabled
  continuously, audio fails after a while.
- A2DPNotificationThreadEntry() clears all the buffers
  in the response and request queues when BT is enabled
  and pushes back the buffers in the request queue.
  In parallel, eventThreadEntry() pushes a buffer back
  to the request queue which makes its size 5 causing
  audio failure.
- In eventThreadEntry(), acquire and release the request and
  response queue mutexes in a proper manner to prevent
  the scenario described above from happening.

Change-Id: I982f8c3281cfc19d44724b8d705453497a1c041b
CRs-Fixed: 365533
(cherry picked from commit da024eb01b8dd29739f2fda8000201a57e6c48de)
media: audio: Remove Pause IOCTL from seekTo

-Pause is now being handled in LPA kernel
driver incase of FLUSH, hence remove it
from seekTo routine.

CRs-Fixed: 342560
(cherry picked from commit 04a8cbf79658184887dc67716d9f11f915e4349b)

Change-Id: I3d04828624d861520dce50235540fff686c9bb01
frameworks/base: Fix for seek issue while LPA Playback

- During LPA playback if we drag the progress bar to seek
  several times, it is observed that audio will play the
  sound of previous position for 2-3 sec.
- When seek command is issued decoder thread is not blocked, which
  is trying to send data available at old position. Due to this we hear
  data available at old position for few seconds.
- Block the decoder thread till all the buffers are flushed

CRs-fixed: 358928
(cherry picked from commit 79165acf34bcd63de27dc735d807e0ef35d9d8c3)

Change-Id: I05203de136430876e61d6ef53a8a45c8fa54cb56
Nuplayer: Fix suspend resume issue for DASH content with no sidx

-For DASH content with no sidx seek fails.
-When suspend resume is done, there is a seek call made
 immediately after start. This causes an EOS to be queued
 for both audio and video tracks even before at least one
 frame is rendered.
-Fix to allow EOS to be queued even before a single frame is rendered.

CRs-fixed: 352201
(cherry picked from commit ab8bdcb673bebea3874071ff431143f54c58a400)

Change-Id: I2b30dd94cc1f822ee889a84773e0348af566d272
libstageright: Enable smooth streaming for Dash Live source

-Enabled smooth streaming for DashLiveSource
-Also,when smooth streaming is enabled, output format change
 event is sent after the next buffer is received from the decoder.
-Made a change to send output format change event immediately after
 it is detected.

CRs-fixed: 359374
(cherry picked from commit a729b71db9050fd589e5ac7008b2acd44498a0c7)

Change-Id: Ie695dbe3f2f5f7000fe1aeaff275e14489c8e1e4

Conflicts:

	media/libmediaplayerservice/nuplayer/NuPlayer.cpp
framework/base: hwui: Clear layer FBO after FBO cache is updated

Due to bug in GLRenderer stale FBO remains and can cause
corruption, clear layer fbo when fbo returned to cache.

CRs-fixed: 340481

(cherry picked from commit b01c082e12c4c4091016af1c95d851f29f5b7514)

Conflicts:

	libs/hwui/LayerRenderer.cpp

Change-Id: I8624879b4adbf9438a8c065b78932d1a4a2a15d4