Remove opaque check in preparing dirty region

Since preserve swap is enabled, we need to clear the color buffer
when the scissor rect is prepared for a new process. This prevents
garbage being present from the previous process in the color buffer.

CRs-Fixed: 549755

Change-Id: Icd12ae388077b8c9ed329c37314e896500078543
(cherry picked from commit 48b6a9767317e08a24e189c9cbee21043543682a)
(cherry picked from commit 777610a5ddf19cebcad30b7e9a481e9dfe38b74c)
Fix stencil buffer bug.

Stencil test is enabled by setStencilFromClip(), but not disabled
in some use case, which causes some of the pixels are discarded by
mistake in draws followed. Disable stencil test when there is no
dirty clip.

CRs-Fixed: 539456

Change-Id: I318fb47212e49e2da89bcbfd161a1689ef91b02f
ActivityTrigger:  New class to invoke when activity starts/resumes

Change-Id: I46fa419e7b97953ba5581ee03127f0e3f93e48f0
(cherry picked from commit 71a57d30370584488a246a904750e7bdad5ba9a0)
(cherry picked from commit 5d2abff8e4d399e6bd320ea11bf672ad3b3be980)
(cherry picked from commit ffd89bcf976985acf0392c0dd667f8b5241d77ac)

frameworks/base: update perflock path name in Activity Trigger

Update the perflock path name and add
backup path for backward compatibility

Change-Id: I3d2c6f6fe1b3c63ec02827d06d5af667266db8d5
(cherry picked from commit 4db57e5021c4091352f40f6e4399b0b929f63151)
(cherry picked from commit b9fc7b99697a1b2f891dc642ff27c8a4194ca79d)
(cherry picked from commit 5910b639f0dea078049e31718e00bede2eb2ec00)

frameworks/base: update library path name in Activity Trigger

Change path from /system/lib to /vendor/lib
since it is no longer needed.

Change-Id: I5fa7a367b21d4128c92ab7190944c176a1f4dae6
(cherry picked from commit 7abea046455c1c8fc99126ae6cf9a6d4823ca50f)
(cherry picked from commit 5aadc3f081bef5b26b13e0bb4955354e3be0bcd7)
(cherry picked from commit 133db12892589a21865a900c3709073ed86eaf8a)

Conflicts:
	services/java/com/android/server/am/ActivityStack.java