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

Unified Diff: cc/surfaces/surface_id.h

Issue 2455663003: Add cc::Surface ref counting. (Closed)
Patch Set: Address comments. 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/BUILD.gn ('k') | cc/surfaces/surface_manager.h » ('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 5be370ed3fb427249f2ec9b6428bb37984eedbce..67477714c98894b5c2e7cad8ec82f686edb2eb92 100644
--- a/cc/surfaces/surface_id.h
+++ b/cc/surfaces/surface_id.h
@@ -9,6 +9,7 @@
#include <stdint.h>
#include <functional>
+#include <string>
#include "base/format_macros.h"
#include "base/hash.h"
@@ -20,11 +21,9 @@ namespace cc {
class SurfaceId {
public:
- SurfaceId() = default;
+ constexpr SurfaceId() = default;
- SurfaceId(const SurfaceId& other)
- : frame_sink_id_(other.frame_sink_id_),
- local_frame_id_(other.local_frame_id_) {}
+ constexpr SurfaceId(const SurfaceId& other) = default;
// A SurfaceId consists of three components: FrameSinkId, local Id, and nonce.
// A |frame_sink_id| consists of two components; one is allocated by the
@@ -37,8 +36,8 @@ class SurfaceId {
// impossible for an unprivileged frame source to embed another frame source
// without being explicitly given the surface ID of that frame source from a
// privileged process.
- SurfaceId(const FrameSinkId& frame_sink_id,
- const LocalFrameId& local_frame_id)
+ constexpr SurfaceId(const FrameSinkId& frame_sink_id,
+ const LocalFrameId& local_frame_id)
: frame_sink_id_(frame_sink_id), local_frame_id_(local_frame_id) {}
bool is_null() const {
« no previous file with comments | « cc/BUILD.gn ('k') | cc/surfaces/surface_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698