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

Unified Diff: cc/surfaces/frame_sink_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
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..a22aa08dba128fda4785984d4668a978b22f020a 100644
--- a/cc/surfaces/frame_sink_id.h
+++ b/cc/surfaces/frame_sink_id.h
@@ -23,6 +23,8 @@ class FrameSinkId {
constexpr FrameSinkId(uint32_t client_id, uint32_t sink_id)
: client_id_(client_id), sink_id_(sink_id) {}
+ constexpr bool is_valid() const { return client_id_ != 0 || sink_id_ != 0; }
+
constexpr bool is_null() 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