Commit 71fcaf34 authored by Yuanyao Zhong's avatar Yuanyao Zhong Committed by Commit Bot

[chromecast] Remove reading display-rotation

Remove reading from command line to obtain cast display rotation from
CastDisplayConfigurator. The display rotation is now read from kernel
for https://chromium-review.googlesource.com/c/chromium/src/+/2229725

Bug: b/77900197
Test: build and run on device.
Change-Id: I8d1f4c49c4a0ae12ea01c982d72af7f2c8617f92
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2252938Reviewed-by: default avatarDaniel Nicoara <dnicoara@chromium.org>
Commit-Queue: Yuanyao Zhong <yyzhong@google.com>
Cr-Commit-Position: refs/heads/master@{#779992}
parent 90285e94
...@@ -30,7 +30,6 @@ namespace { ...@@ -30,7 +30,6 @@ namespace {
constexpr int64_t kStubDisplayId = 1; constexpr int64_t kStubDisplayId = 1;
constexpr char kCastGraphicsHeight[] = "cast-graphics-height"; constexpr char kCastGraphicsHeight[] = "cast-graphics-height";
constexpr char kCastGraphicsWidth[] = "cast-graphics-width"; constexpr char kCastGraphicsWidth[] = "cast-graphics-width";
constexpr char kDisplayRotation[] = "display-rotation";
gfx::Size GetDefaultScreenResolution() { gfx::Size GetDefaultScreenResolution() {
#if BUILDFLAG(IS_CAST_AUDIO_ONLY) #if BUILDFLAG(IS_CAST_AUDIO_ONLY)
...@@ -64,20 +63,6 @@ gfx::Size GetScreenResolution() { ...@@ -64,20 +63,6 @@ gfx::Size GetScreenResolution() {
return GetDefaultScreenResolution(); return GetDefaultScreenResolution();
} }
display::Display::Rotation GetRotationFromCommandLine() {
std::string rotation =
base::CommandLine::ForCurrentProcess()->GetSwitchValueNative(
kDisplayRotation);
if (rotation == "90")
return display::Display::ROTATE_90;
else if (rotation == "180")
return display::Display::ROTATE_180;
else if (rotation == "270")
return display::Display::ROTATE_270;
else
return display::Display::ROTATE_0;
}
display::Display::Rotation RotationFromPanelOrientation( display::Display::Rotation RotationFromPanelOrientation(
display::PanelOrientation orientation) { display::PanelOrientation orientation) {
switch (orientation) { switch (orientation) {
...@@ -145,7 +130,7 @@ void CastDisplayConfigurator::OnConfigurationChanged() { ...@@ -145,7 +130,7 @@ void CastDisplayConfigurator::OnConfigurationChanged() {
void CastDisplayConfigurator::ConfigureDisplayFromCommandLine() { void CastDisplayConfigurator::ConfigureDisplayFromCommandLine() {
const gfx::Size size = GetScreenResolution(); const gfx::Size size = GetScreenResolution();
UpdateScreen(kStubDisplayId, gfx::Rect(size), GetDeviceScaleFactor(size), UpdateScreen(kStubDisplayId, gfx::Rect(size), GetDeviceScaleFactor(size),
GetRotationFromCommandLine()); display::Display::ROTATE_0);
} }
void CastDisplayConfigurator::SetColorMatrix( void CastDisplayConfigurator::SetColorMatrix(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment