am 355950c1: am d177e044: Merge "SF: Swap w/h when capturing rotated screenshots" into mnc-dev

* commit '355950c1fc19c35c75203ea761882168f0980181':
  SF: Swap w/h when capturing rotated screenshots
This commit is contained in:
Dan Stoza 2015-06-10 18:08:31 +00:00 committed by Android Git Automerger
commit d1adebc2da

View File

@ -3320,8 +3320,12 @@ status_t SurfaceFlinger::captureScreenImplLocked(
ATRACE_CALL(); ATRACE_CALL();
// get screen geometry // get screen geometry
const uint32_t hw_w = hw->getWidth(); uint32_t hw_w = hw->getWidth();
const uint32_t hw_h = hw->getHeight(); uint32_t hw_h = hw->getHeight();
if (rotation & Transform::ROT_90) {
std::swap(hw_w, hw_h);
}
if ((reqWidth > hw_w) || (reqHeight > hw_h)) { if ((reqWidth > hw_w) || (reqHeight > hw_h)) {
ALOGE("size mismatch (%d, %d) > (%d, %d)", ALOGE("size mismatch (%d, %d) > (%d, %d)",