surfaceflinger: Apply bugfixes to the correct hwc code paths

Changes I2deaf2ed101e8ea76708862a6bb67751b6078794 and
I1cb44389a05c9ec049d7f0d39c288feccb11a91c, both meant to deal
with corner-case layer states, were mistakenly merged into
the pre-1.0-hwc code paths. Move them to their intended locations

Change-Id: Idd6b3513cc36dda21b552eee97f9ea91793df18f
SF: Avoid wormhole clear for BLIT calls

Do not call GPU clear from SF when composition
type is BLIT as it'll be taken care in HAL.

Change-Id: Ia613eb9b824c6484ecc8c8fa4ee883545d8541b8
Graphics:Add error check when create GraphicBuffer

Change-Id: Ib0ca59bf1dfe4ae0266c29c91c1dbe3d02c0904e
Author: Lingyun Zhu <lingyun.zhu@intel.com>
Signed-off-by: Lingyun Zhu <lingyun.zhu@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 50141
sf: Fix detection of 0.3 hwcomposer

The format was different, so look at the header bits too...

Change-Id: Ibc3d4c9f6bca74d6951041f92e2ecc6189e58c41
sf: Don't do premultiplied alpha blending on the statusbar for hwc <= 0.3

Blending the translucent statusbar with the limited alpha implementation
of older HWC versions is glitch-prone, so don't do that with the compositor
at all

Change-Id: I96b49823b837a5063960d39c0937caea8bb3116a