Merge "SF: Swap w/h when capturing rotated screenshots"

This commit is contained in:
Dan Stoza 2015-06-10 18:10:07 +00:00 committed by Gerrit Code Review
commit 127cf2eff6

View File

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