Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: ui/display/display.cc

Issue 2777343002: exo: Rotate cursor snapshot for rotated displays (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« ui/display/display.h ('K') | « ui/display/display.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/display.cc
diff --git a/ui/display/display.cc b/ui/display/display.cc
index ae0eb5118995c5a124651956c80f9ee9e52ef613..c0c429abe3bbfe0c80f7130401a6e301582b8db5 100644
--- a/ui/display/display.cc
+++ b/ui/display/display.cc
@@ -103,8 +103,9 @@ Display::Display(const Display& other) = default;
Display::~Display() {}
-int Display::RotationAsDegree() const {
- switch (rotation_) {
+// static
+int Display::RotationAsDegree(Rotation rotation) {
+ switch (rotation) {
case ROTATE_0:
return 0;
case ROTATE_90:
@@ -118,6 +119,10 @@ int Display::RotationAsDegree() const {
return 0;
}
+int Display::RotationAsDegree() const {
+ return RotationAsDegree(rotation_);
+}
+
void Display::SetRotationAsDegree(int rotation) {
switch (rotation) {
case 0:
« ui/display/display.h ('K') | « ui/display/display.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698