Bug 1131470 - Part 2: Update screen configuration HAL to report orientation angle. r=snorp,mwu

This commit is contained in:
William Chen
2015-08-18 14:55:15 -07:00
parent ecf84fcf22
commit 8b4785e7f6
14 changed files with 85 additions and 5 deletions

View File

@@ -123,6 +123,7 @@ GetCurrentScreenConfiguration(ScreenConfiguration* aScreenConfiguration)
nsIntRect rect;
int32_t colorDepth, pixelDepth;
int16_t angle;
ScreenOrientationInternal orientation;
nsCOMPtr<nsIScreen> screen;
@@ -131,9 +132,10 @@ GetCurrentScreenConfiguration(ScreenConfiguration* aScreenConfiguration)
screen->GetColorDepth(&colorDepth);
screen->GetPixelDepth(&pixelDepth);
orientation = static_cast<ScreenOrientationInternal>(bridge->GetScreenOrientation());
angle = bridge->GetScreenAngle();
*aScreenConfiguration =
hal::ScreenConfiguration(rect, orientation, colorDepth, pixelDepth);
hal::ScreenConfiguration(rect, orientation, angle, colorDepth, pixelDepth);
}
bool