diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-16 05:22:28 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-16 05:22:28 +0000 |
commit | 54bf8134a16d70ae7302432d87420ecda6c1076b (patch) | |
tree | 4bd1a72d6a1e403aea1c566b271efc6047acbcf1 /cc/surfaces/surface.cc | |
parent | 31a8825bab0ddfb7da147302f2646632ac63c18a (diff) | |
download | chromium_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.cc')
-rw-r--r-- | cc/surfaces/surface.cc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/cc/surfaces/surface.cc b/cc/surfaces/surface.cc new file mode 100644 index 0000000..12f360a --- /dev/null +++ b/cc/surfaces/surface.cc @@ -0,0 +1,24 @@ +// 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. + +#include "cc/surfaces/surface.h" + +#include "cc/surfaces/surface_manager.h" + +namespace cc { + +Surface::Surface(SurfaceManager* manager, + SurfaceClient* client, + const gfx::Size& size) + : manager_(manager), + client_(client), + size_(size) { + surface_id_ = manager_->RegisterAndAllocateIDForSurface(this); +} + +Surface::~Surface() { + manager_->DeregisterSurface(surface_id_); +} + +} // namespace cc |