hwc: Add check for dirtyRect clear call.
We should call clear in dirtyRect only if its a valid region to clear. CRs-Fixed: 768200 Change-Id: If627170e9f4893fe13a85a9929511858132d5405
This commit is contained in:
committed by
radhakrishna
parent
a1cb887cad
commit
75b427cc0a
@@ -533,19 +533,21 @@ bool CopyBit::draw(hwc_context_t *ctx, hwc_display_contents_1_t *list,
|
||||
}
|
||||
|
||||
mDirtyLayerIndex = checkDirtyRect(ctx, list, dpy);
|
||||
if( mDirtyLayerIndex != -1){
|
||||
hwc_layer_1_t *layer = &list->hwLayers[mDirtyLayerIndex];
|
||||
hwc_rect_t clearRegion = {0,0,0,0};
|
||||
if (CBUtils::getuiClearRegion(list, clearRegion, layerProp)){
|
||||
if (mDirtyLayerIndex != -1){
|
||||
hwc_layer_1_t *layer = &list->hwLayers[mDirtyLayerIndex];
|
||||
#ifdef QCOM_BSP
|
||||
clear(renderBuffer,layer->dirtyRect);
|
||||
hwc_rect_t result = getIntersection(layer->dirtyRect,clearRegion);
|
||||
if(isValidRect(result))
|
||||
clear(renderBuffer,result);
|
||||
#else
|
||||
clear(renderBuffer,layer->displayFrame);
|
||||
clear(renderBuffer,clearRegion);
|
||||
#endif
|
||||
} else {
|
||||
hwc_rect_t clearRegion = {0,0,0,0};
|
||||
if(CBUtils::getuiClearRegion(list, clearRegion, layerProp))
|
||||
} else {
|
||||
clear(renderBuffer, clearRegion);
|
||||
}
|
||||
}
|
||||
|
||||
// numAppLayers-1, as we iterate from 0th layer index with HWC_COPYBIT flag
|
||||
for (int i = 0; i <= (ctx->listStats[dpy].numAppLayers-1); i++) {
|
||||
if(!(layerProp[i].mFlags & HWC_COPYBIT)) {
|
||||
|
||||
Reference in New Issue
Block a user