From 16a6af1553f9eddf570459ae859f812a5a100611 Mon Sep 17 00:00:00 2001 From: "jamesr@chromium.org" Date: Fri, 13 Jun 2014 04:20:16 +0000 Subject: 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 --- cc/layers/surface_layer_impl.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cc/layers/surface_layer_impl.h') 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 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); }; -- cgit v1.1