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

Unified Diff: cc/surfaces/local_frame_id.h

Issue 2425923003: Replaced is_null() with is_valid in SurfaceId and related classes. (Closed)
Patch Set: Removed added printf statements; LocalFrameId::is_valid() no longer checks if nonce is 0. Created 4 years, 2 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 | « cc/surfaces/frame_sink_id.h ('k') | cc/surfaces/surface_aggregator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/local_frame_id.h
diff --git a/cc/surfaces/local_frame_id.h b/cc/surfaces/local_frame_id.h
index 859e0070e8d339a92403860aa51afd371ac323cb..3d10aaac9c4b703b3d7dff52717fd47d60fbfa4b 100644
--- a/cc/surfaces/local_frame_id.h
+++ b/cc/surfaces/local_frame_id.h
@@ -23,6 +23,8 @@ class LocalFrameId {
constexpr LocalFrameId(uint32_t local_id, uint64_t nonce)
: local_id_(local_id), nonce_(nonce) {}
+ constexpr bool is_valid() const { return local_id_ != 0; }
Fady Samuel 2016/10/20 12:15:36 I disagree with this. is_valid() means local_id_ !
Alex Z. 2016/11/08 21:38:19 Done.
+
constexpr bool is_null() const { return local_id_ == 0 && nonce_ == 0; }
Fady Samuel 2016/10/20 12:15:36 Ideally, I'd like to get rid of is_null() because
Alex Z. 2016/11/08 21:38:19 Done.
constexpr uint32_t local_id() const { return local_id_; }
« no previous file with comments | « cc/surfaces/frame_sink_id.h ('k') | cc/surfaces/surface_aggregator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698