diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-13 04:20:16 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-13 04:20:16 +0000 |
commit | 16a6af1553f9eddf570459ae859f812a5a100611 (patch) | |
tree | 309626d2d0f54826b15d8a8b4997f9b700165388 /cc/layers/surface_layer_impl.h | |
parent | 9289b4e99a23444328d95a736b54a42aab21bb27 (diff) | |
download | chromium_src-16a6af1553f9eddf570459ae859f812a5a100611.zip chromium_src-16a6af1553f9eddf570459ae859f812a5a100611.tar.gz chromium_src-16a6af1553f9eddf570459ae859f812a5a100611.tar.bz2 |
Use a struct for cc::Surface ids for more type safety
We currently represent surface ids as just an int, but may want to move
to a richer data structure in the future. Identifiers that are ints are also
pretty easy to confuse with other ints.
R=piman@chromium.org
Review URL: https://codereview.chromium.org/331533002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276923 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layers/surface_layer_impl.h')
-rw-r--r-- | cc/layers/surface_layer_impl.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cc/layers/surface_layer_impl.h b/cc/layers/surface_layer_impl.h index b8447d0..82ac227 100644 --- a/cc/layers/surface_layer_impl.h +++ b/cc/layers/surface_layer_impl.h @@ -8,6 +8,7 @@ #include "base/memory/scoped_ptr.h" #include "cc/base/cc_export.h" #include "cc/layers/layer_impl.h" +#include "cc/surfaces/surface_id.h" namespace cc { @@ -18,7 +19,7 @@ class CC_EXPORT SurfaceLayerImpl : public LayerImpl { } virtual ~SurfaceLayerImpl(); - void SetSurfaceId(int surface_id); + void SetSurfaceId(SurfaceId surface_id); // LayerImpl overrides. virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) @@ -36,7 +37,7 @@ class CC_EXPORT SurfaceLayerImpl : public LayerImpl { virtual void AsValueInto(base::DictionaryValue* dict) const OVERRIDE; virtual const char* LayerTypeAsString() const OVERRIDE; - int surface_id_; + SurfaceId surface_id_; DISALLOW_COPY_AND_ASSIGN(SurfaceLayerImpl); }; |