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

Unified Diff: mojo/converters/geometry/geometry_type_converters.h

Issue 868263002: Sky shouldn't crash on device rotate (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « no previous file | sky/compositor/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/converters/geometry/geometry_type_converters.h
diff --git a/mojo/converters/geometry/geometry_type_converters.h b/mojo/converters/geometry/geometry_type_converters.h
index 988bfadd3e4dc7ecec4c8633c278de4b1d5c7bce..72794b05beba5a99780913ff9236dddb4681ae6a 100644
--- a/mojo/converters/geometry/geometry_type_converters.h
+++ b/mojo/converters/geometry/geometry_type_converters.h
@@ -89,6 +89,10 @@ struct MOJO_GEOMETRY_EXPORT TypeConverter<gfx::Rect, Rect> {
} // namespace mojo
+inline bool operator==(const mojo::Size& lhs, const mojo::Size& rhs) {
+ return lhs.width == rhs.width && lhs.height == rhs.height;
+}
+
inline bool operator==(const gfx::Size& lhs, const mojo::Size& rhs) {
return lhs.width() == rhs.width && lhs.height() == rhs.height;
}
@@ -97,4 +101,16 @@ inline bool operator==(const mojo::Size& lhs, const gfx::Size& rhs) {
return rhs == lhs;
}
+inline bool operator!=(const mojo::Size& lhs, const mojo::Size& rhs) {
+ return !(lhs == rhs);
+}
+
+inline bool operator!=(const gfx::Size& lhs, const mojo::Size& rhs) {
+ return !(lhs == rhs);
+}
+
+inline bool operator!=(const mojo::Size& lhs, const gfx::Size& rhs) {
+ return !(lhs == rhs);
+}
+
#endif // MOJO_CONVERTERS_GEOMETRY_GEOMETRY_TYPE_CONVERTERS_H_
« no previous file with comments | « no previous file | sky/compositor/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698