summaryrefslogtreecommitdiffstats
path: root/cc/surfaces/surface.h
diff options
context:
space:
mode:
authorjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-16 05:22:28 +0000
committerjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-16 05:22:28 +0000
commit54bf8134a16d70ae7302432d87420ecda6c1076b (patch)
tree4bd1a72d6a1e403aea1c566b271efc6047acbcf1 /cc/surfaces/surface.h
parent31a8825bab0ddfb7da147302f2646632ac63c18a (diff)
downloadchromium_src-54bf8134a16d70ae7302432d87420ecda6c1076b.zip
chromium_src-54bf8134a16d70ae7302432d87420ecda6c1076b.tar.gz
chromium_src-54bf8134a16d70ae7302432d87420ecda6c1076b.tar.bz2
Skeleton surface interfaces in cc/surfaces
This adds a very basic surface class with tests under cc/surfaces to establish gyp and DEPS rules. While this system is under early development it shouldn't be used by anything outside of unit tests. BUG=334090 Review URL: https://codereview.chromium.org/131893003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245137 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/surfaces/surface.h')
-rw-r--r--cc/surfaces/surface.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/cc/surfaces/surface.h b/cc/surfaces/surface.h
new file mode 100644
index 0000000..e18d121
--- /dev/null
+++ b/cc/surfaces/surface.h
@@ -0,0 +1,37 @@
+// Copyright 2014 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_H_
+#define CC_SURFACES_SURFACE_H_
+
+#include "base/macros.h"
+#include "cc/surfaces/surfaces_export.h"
+#include "ui/gfx/size.h"
+
+namespace cc {
+class SurfaceManager;
+class SurfaceClient;
+
+class CC_SURFACES_EXPORT Surface {
+ public:
+ Surface(SurfaceManager* manager,
+ SurfaceClient* client,
+ const gfx::Size& size);
+ ~Surface();
+
+ const gfx::Size& size() const { return size_; }
+ int surface_id() const { return surface_id_; }
+
+ private:
+ SurfaceManager* manager_;
+ SurfaceClient* client_;
+ gfx::Size size_;
+ int surface_id_;
+
+ DISALLOW_COPY_AND_ASSIGN(Surface);
+};
+
+} // namespace cc
+
+#endif // CC_SURFACES_SURFACE_H_