hwc: Enable swapRect for multiple updating layers use cases
In current code swapRect optimization is enabled for the use cases,
where only one layer is updating. this change will enable swapRect for
use cases where more than one layer is updating.
Change-Id: I902ecaa4ab53eac1115d5ea40c9cd582f639bfd8
diff --git a/libhwcomposer/hwc_copybit.h b/libhwcomposer/hwc_copybit.h
index 0d05dd9..a1601cc 100644
--- a/libhwcomposer/hwc_copybit.h
+++ b/libhwcomposer/hwc_copybit.h
@@ -131,13 +131,11 @@
bool mSwapRectEnable;
int mAlignedWidth;
int mAlignedHeight;
- int mDirtyLayerIndex;
+ int mSwapRect;
LayerCache mLayerCache;
FbCache mFbCache;
hwc_rect_t mDirtyRect;
- int getLayersChanging(hwc_context_t *ctx, hwc_display_contents_1_t *list,
- int dpy);
- int checkDirtyRect(hwc_context_t *ctx, hwc_display_contents_1_t *list,
+ bool prepareSwapRect(hwc_context_t *ctx, hwc_display_contents_1_t *list,
int dpy);
bool isLayerChanging(hwc_context_t *ctx,
hwc_display_contents_1_t *list, int k);