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

Unified Diff: cc/surfaces/frame_sink_id.h

Issue 2425923003: Replaced is_null() with is_valid in SurfaceId and related classes. (Closed)
Patch Set: Fixed an exo compile error Created 4 years, 1 month 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
Index: cc/surfaces/frame_sink_id.h
diff --git a/cc/surfaces/frame_sink_id.h b/cc/surfaces/frame_sink_id.h
index b8f3675fd21f3ea4eba08eea2843affc876c035a..d65c8de8d474d20a2f6dafd5577dc17381feffe1 100644
--- a/cc/surfaces/frame_sink_id.h
+++ b/cc/surfaces/frame_sink_id.h
@@ -23,7 +23,7 @@ class FrameSinkId {
constexpr FrameSinkId(uint32_t client_id, uint32_t sink_id)
: client_id_(client_id), sink_id_(sink_id) {}
- constexpr bool is_null() const { return client_id_ == 0 && sink_id_ == 0; }
+ constexpr bool is_valid() const { return client_id_ != 0 || sink_id_ != 0; }
constexpr uint32_t client_id() const { return client_id_; }

Powered by Google App Engine
This is Rietveld 408576698