Index: cc/surfaces/surface_info.h |
diff --git a/cc/surfaces/surface_info.h b/cc/surfaces/surface_info.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6152ec50f16c12f83ba4da79da21a459736a2d1a |
--- /dev/null |
+++ b/cc/surfaces/surface_info.h |
@@ -0,0 +1,38 @@ |
+// 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. |
+ |
+#ifndef CC_SURFACES_SURFACE_INFO_H_ |
+#define CC_SURFACES_SURFACE_INFO_H_ |
+ |
+#include "cc/surfaces/surface_id.h" |
+#include "ui/gfx/geometry/size.h" |
+ |
+namespace cc { |
+ |
+// This class contains information about the surface that is being embedded. |
+class SurfaceInfo { |
+ public: |
+ SurfaceInfo() = default; |
Fady Samuel
2016/12/14 20:11:39
Do you need this default constructor?
Saman Sami
2016/12/14 20:47:52
We might need it for mojo.
|
+ SurfaceInfo(const SurfaceId& id, float scale, gfx::Size size) |
kylechar
2016/12/14 20:51:53
const gfx::Size& size
Saman Sami
2016/12/14 21:54:22
Done.
|
+ : id_(id), scale_(scale), size_(size) {} |
+ |
+ bool operator==(const SurfaceInfo& info) const { |
+ return id_ == info.id() && scale_ == info.scale() && size_ == info.size(); |
+ } |
+ |
+ bool operator!=(const SurfaceInfo& info) const { return !(*this == info); } |
+ |
+ const SurfaceId& id() const { return id_; } |
+ float scale() const { return scale_; } |
+ const gfx::Size& size() const { return size_; } |
+ |
+ private: |
+ SurfaceId id_; |
+ float scale_ = 1.f; |
+ gfx::Size size_; |
+}; |
+ |
+} // namespace cc |
+ |
+#endif // CC_SURFACES_SURFACE_INFO_H_ |