surfaceflinger: don't handle EVENT_ORIENTATION when !HWC_DEVICE_API_VERSION_1_0

a184463 causes segfault on boot for the enrc2b (and probably others), this fixes it.

Change-Id: Ic4a7a05b44c8cc44a0d25c56def4acdf5b0939df
frameworks/native: Fix toroplus radio with CFLAGS

This is a commit to fix the LTE radio on toroplus,
since the binaries contain a broken reference to
an old no longer existent object. This fixes that
with a CFLAGS to be enabled in the .mk files of the
toroplus device files (like BoardConfig.mk).

Credit for the original fix goes to
Sean McClenaghan (cyberkitsune09@gmail.com)
http://review.cyanogenmod.org/#/c/47134/

PS 2-3: forgot some stuff in the commit message

Change-Id: I2c0f05d1f70b96ad801971f23f6f9cf4e0fa7167
make TARGET_QCOM_DISPLAY_VARIANT more parametric

Change-Id: I36bba3ba96e174b443d800fd79957a1f428899df
surfaceflinger: Fix legacy qcom display

This change: http://review.cyanogenmod.org/50222 disabled code
that is needed for legacy qcom using jb mr0 adreno blobs. Reenable
the needed code when qcom display variant is "legacy"

Signed-off-by: Michael Bestas <mikeioannina@gmail.com>
Unbreak libgui

Change I2c0f05d1f70b96ad801971f23f6f9cf4e0fa7167 broke libgui for a
bunch of pre-4.1 blobs by changing the surfaceclient API, so bring
it back

Change-Id: I1f6ce3b886539d0e972bbe41116192bf162be968
surfaceflingerconsumer: Select texture target based on pixel format

Adreno is not optimized for GL_TEXTURE_EXTERNAL_OES, making GPU
utilization (and power), high with GL_TEXTURE_EXTERNAL_OES for
RGB formats.
Change texture target from GL_EXTERNAL_TEXTURE_OES to dynamically
select between GL_EXTERNAL_TEXTURE_OES, and GL_TEXTURE_2D based
on the pixel format.
This change is done to reduce the composition time for 8x55
*Ported from ics
*ifdef for BOARD_ADRENO_DECIDE_TEXTURE_TARGET

*Ported to Android 4.3

Change-Id: I2ec2ceeee6b201d4d2c8e8227ccb4789f957da23