Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3150)

Unified Diff: cc/layers/surface_layer_impl.h

Issue 331533002: Use a struct for cc::Surface ids for more type safety (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add is_null and explicit ctor Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/surface_layer.cc ('k') | cc/layers/surface_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/surface_layer_impl.h
diff --git a/cc/layers/surface_layer_impl.h b/cc/layers/surface_layer_impl.h
index b8447d0e44f8361552e903d11cbd80c1691e2bb2..82ac2279e2503637d92d7d191362c11dbd194ed5 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);
};
« no previous file with comments | « cc/layers/surface_layer.cc ('k') | cc/layers/surface_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698