sdm: hwc: Add featurization

Featurize some of the changes which will not be
needed based on a flag

Change-Id: I0d9ad772d99dc75df3205e15e83e9c650cdefebc
diff --git a/sdm/libs/hwc/hwc_display.cpp b/sdm/libs/hwc/hwc_display.cpp
index 42bf7e3..2200e09 100644
--- a/sdm/libs/hwc/hwc_display.cpp
+++ b/sdm/libs/hwc/hwc_display.cpp
@@ -138,9 +138,6 @@
   case HWC_EVENT_VSYNC:
     error = display_intf_->SetVSyncState(enable);
     break;
-  case HWC_EVENT_ORIENTATION:
-    // TODO(user): Need to handle this case
-    break;
   default:
     DLOGW("Unsupported event = %d", event);
   }
@@ -227,9 +224,11 @@
     case HWC_DISPLAY_DPI_Y:
       values[i] = INT32(variable_config.y_dpi * 1000.0f);
       break;
+#ifdef QCOM_BSP
     case HWC_DISPLAY_SECURE:
       values[i] = INT32(true);  // For backward compatibility. All Physical displays are secure
       break;
+#endif
     default:
       DLOGW("Spurious attribute type = %d", attributes[i]);
       return -EINVAL;
@@ -522,7 +521,7 @@
     for (size_t j = 0; j < hwc_layer.visibleRegionScreen.numRects; j++) {
       SetRect(hwc_layer.visibleRegionScreen.rects[j], &layer.visible_regions.rect[j]);
     }
-    SetRect(hwc_layer.dirtyRect, &layer.dirty_regions.rect[0]);
+    SetRect(hwc_layer.sourceCropf, &layer.dirty_regions.rect[0]);
     SetComposition(hwc_layer.compositionType, &layer.composition);
 
     // For dim layers, SurfaceFlinger
@@ -569,11 +568,11 @@
       LayerCache layer_cache = layer_stack_cache_.layer_cache[i];
       layer.flags.updating = IsLayerUpdating(hwc_layer, layer_cache);
     }
-
+#ifdef QCOM_BSP
     if (hwc_layer.flags & HWC_SCREENSHOT_ANIMATOR_LAYER) {
       layer_stack_.flags.animating = true;
     }
-
+#endif
     if (layer.flags.skip) {
       layer_stack_.flags.skip_present = true;
     }