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

Side by Side Diff: cc/surfaces/surface_id.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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_SURFACES_SURFACE_ID_H_
6 #define CC_SURFACES_SURFACE_ID_H_
7
8 namespace cc {
9
10 struct SurfaceId {
11 SurfaceId() : id(0) {}
12
13 int id;
14 };
15
16 inline bool operator==(const SurfaceId& a, const SurfaceId& b) {
17 return a.id == b.id;
18 }
19
20 inline bool operator!=(const SurfaceId& a, const SurfaceId& b) {
21 return !(a == b);
22 }
23
24 } // namespace cc
25
26 #endif // CC_SURFACES_SURFACE_ID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698