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

Unified Diff: cc/surfaces/surface_id.h

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/local_frame_id.cc ('k') | cc/surfaces/surface_id.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_id.h
diff --git a/cc/surfaces/surface_id.h b/cc/surfaces/surface_id.h
index aa6c9c5d667fe420743e97585f796378b165076f..6df5009a2bd5cce8146cb3d0c391f0ea778337c0 100644
--- a/cc/surfaces/surface_id.h
+++ b/cc/surfaces/surface_id.h
@@ -5,15 +5,13 @@
#ifndef CC_SURFACES_SURFACE_ID_H_
#define CC_SURFACES_SURFACE_ID_H_
-#include <stddef.h>
#include <stdint.h>
-#include <functional>
+#include <iosfwd>
#include <string>
#include "base/format_macros.h"
#include "base/hash.h"
-#include "base/strings/stringprintf.h"
#include "cc/surfaces/frame_sink_id.h"
#include "cc/surfaces/local_frame_id.h"
@@ -49,11 +47,7 @@ class SurfaceId {
const LocalFrameId& local_frame_id() const { return local_frame_id_; }
- std::string ToString() const {
- return base::StringPrintf("SurfaceId(%s, %s)",
- frame_sink_id_.ToString().c_str(),
- local_frame_id_.ToString().c_str());
- }
+ std::string ToString() const;
bool operator==(const SurfaceId& other) const {
return frame_sink_id_ == other.frame_sink_id_ &&
@@ -73,6 +67,8 @@ class SurfaceId {
LocalFrameId local_frame_id_;
};
+std::ostream& operator<<(std::ostream& out, const SurfaceId& surface_id);
+
struct SurfaceIdHash {
size_t operator()(const SurfaceId& key) const { return key.hash(); }
};
« no previous file with comments | « cc/surfaces/local_frame_id.cc ('k') | cc/surfaces/surface_id.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698