Skip to content

Commit

Permalink
display: initialize viewFrame info for external displays
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
Arun Kumar K.R authored and Simon Wilson committed Jan 9, 2015
1 parent 5470587 commit 88de95b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions msm8226/libexternal/external.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
7 changes: 7 additions & 0 deletions msm8226/libvirtual/virtual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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__,
Expand Down

0 comments on commit 88de95b

Please sign in to comment.