display: initialize viewFrame info for external displays

- At the initialization, set the viewFrame info for the external
  and virtual displays to its resolution.
- It will be modified later based on the display projection

Change-Id: I25b74dcd375cb15386d5dad6f6d3730b15969f8f
This commit is contained in:
Arun Kumar K.R 2014-06-25 00:53:34 -07:00 committed by Simon Wilson
parent 5470587fb1
commit 88de95b6ca
2 changed files with 14 additions and 0 deletions

View File

@ -620,6 +620,13 @@ void ExternalDisplay::setAttributes() {
mHwcContext->dpyAttr[HWC_DISPLAY_EXTERNAL].mDownScaleMode =true;
}
}
//Initialize the display viewFrame info
mHwcContext->mViewFrame[HWC_DISPLAY_EXTERNAL].left = 0;
mHwcContext->mViewFrame[HWC_DISPLAY_EXTERNAL].top = 0;
mHwcContext->mViewFrame[HWC_DISPLAY_EXTERNAL].right =
(int)mHwcContext->dpyAttr[HWC_DISPLAY_EXTERNAL].xres;
mHwcContext->mViewFrame[HWC_DISPLAY_EXTERNAL].bottom =
(int)mHwcContext->dpyAttr[HWC_DISPLAY_EXTERNAL].yres;
mHwcContext->dpyAttr[HWC_DISPLAY_EXTERNAL].vsync_period =
(int) 1000000000l / fps;
}

View File

@ -194,6 +194,13 @@ void VirtualDisplay::setAttributes() {
setDownScaleMode(maxArea);
}
//Initialize the display viewFrame info
mHwcContext->mViewFrame[HWC_DISPLAY_VIRTUAL].left = 0;
mHwcContext->mViewFrame[HWC_DISPLAY_VIRTUAL].top = 0;
mHwcContext->mViewFrame[HWC_DISPLAY_VIRTUAL].right =
(int)mHwcContext->dpyAttr[HWC_DISPLAY_VIRTUAL].xres;
mHwcContext->mViewFrame[HWC_DISPLAY_VIRTUAL].bottom =
(int)mHwcContext->dpyAttr[HWC_DISPLAY_VIRTUAL].yres;
mHwcContext->dpyAttr[HWC_DISPLAY_VIRTUAL].vsync_period =
1000000000l /60;
ALOGD_IF(DEBUG,"%s: Setting Virtual Attr: res(%d x %d)",__FUNCTION__,