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

Unified Diff: ui/display/types/display_mode.cc

Issue 2646213002: Write mojom and StructTraits for DisplaySnapshot. (Closed)
Patch Set: fix format/comments. Refactor structure/code. Created 3 years, 10 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/types/display_mode.h ('K') | « ui/display/types/display_mode.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/types/display_mode.cc
diff --git a/ui/display/types/display_mode.cc b/ui/display/types/display_mode.cc
index 6d43caa5638406c5e43a4b7003d0e491db066715..e452d5a9d09746091da318a4fae9ab8bebb73856 100644
--- a/ui/display/types/display_mode.cc
+++ b/ui/display/types/display_mode.cc
@@ -24,6 +24,12 @@ std::unique_ptr<DisplayMode> DisplayMode::Clone() const {
refresh_rate_));
}
+bool DisplayMode::operator==(const DisplayMode& display_mode) const {
+ return (this->size() == display_mode.size()) &&
kylechar 2017/02/13 22:01:24 You don't need () around each == statement.
thanhph1 2017/02/14 20:20:54 Done.
+ (this->is_interlaced() == display_mode.is_interlaced()) &&
+ (this->refresh_rate() == display_mode.refresh_rate());
+}
+
std::string DisplayMode::ToString() const {
return base::StringPrintf("[%dx%d %srate=%f]",
size_.width(),
« ui/display/types/display_mode.h ('K') | « ui/display/types/display_mode.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698