Handle sRGB gralloc formats.

gralloc: recognize and allocate sRGB_{A,X}_8888
hwcomposer: punt sRGB formats to FRAMEBUFFER composition
- This would happen already due to the format-supported test, this
  change just avoids an unrecognized-format log warning from
  exynos5_format_to_bpp().

Bug: 10134664
Change-Id: I78b7791217cbde28d5bc7d02caf6a955960828ce
diff --git a/libhwc/hwc.cpp b/libhwc/hwc.cpp
index 94e8c59..dca45ef 100644
--- a/libhwc/hwc.cpp
+++ b/libhwc/hwc.cpp
@@ -799,10 +799,6 @@
         return false;
     }
 
-    if (exynos5_visible_width(layer, handle->format, pdev) < BURSTLEN_BYTES) {
-        ALOGV("\tlayer %u: visible area is too narrow", i);
-        return false;
-    }
     if (exynos5_requires_gscaler(layer, handle->format)) {
         if (!exynos5_supports_gscaler(layer, handle->format, false)) {
             ALOGV("\tlayer %u: gscaler required but not supported", i);
@@ -814,6 +810,10 @@
             return false;
         }
     }
+    if (exynos5_visible_width(layer, handle->format, pdev) < BURSTLEN_BYTES) {
+        ALOGV("\tlayer %u: visible area is too narrow", i);
+        return false;
+    }
     if (!exynos5_blending_is_supported(layer.blending)) {
         ALOGV("\tlayer %u: blending %d not supported", i, layer.blending);
         return false;