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

Unified Diff: cc/surfaces/surface_id.cc

Issue 2521543003: Add stream operator for SurfaceId/FrameSinkId/LocalFrameId. (Closed)
Patch Set: Add another missing include. 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
« no previous file with comments | « cc/surfaces/surface_id.h ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_id.cc
diff --git a/cc/surfaces/surface_id.cc b/cc/surfaces/surface_id.cc
new file mode 100644
index 0000000000000000000000000000000000000000..0262313a4f8fd022a2b01c817e894b5eec361806
--- /dev/null
+++ b/cc/surfaces/surface_id.cc
@@ -0,0 +1,21 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "cc/surfaces/surface_id.h"
+
+#include "base/strings/stringprintf.h"
+
+namespace cc {
+
+std::string SurfaceId::ToString() const {
+ return base::StringPrintf("SurfaceId(%s, %s)",
+ frame_sink_id_.ToString().c_str(),
+ local_frame_id_.ToString().c_str());
+}
+
+std::ostream& operator<<(std::ostream& out, const SurfaceId& surface_id) {
+ return out << surface_id.ToString();
+}
+
+} // namespace cc
« no previous file with comments | « cc/surfaces/surface_id.h ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698