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

Side by Side Diff: cc/surfaces/surface_id_allocator.h

Issue 1996783002: Make cc::SurfaceId unguessable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed more build targets Created 4 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_SURFACES_SURFACE_ID_ALLOCATOR_H_ 5 #ifndef CC_SURFACES_SURFACE_ID_ALLOCATOR_H_
6 #define CC_SURFACES_SURFACE_ID_ALLOCATOR_H_ 6 #define CC_SURFACES_SURFACE_ID_ALLOCATOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 21 matching lines...) Expand all
32 // When this SurfaceIdAllocator is destroyed, its namespace is 32 // When this SurfaceIdAllocator is destroyed, its namespace is
33 // automatically invalidated and any remaining sequences with that 33 // automatically invalidated and any remaining sequences with that
34 // namespace will be ignored. This method does not need to be called in 34 // namespace will be ignored. This method does not need to be called in
35 // contexts where there is no SurfaceManager (e.g. a renderer process). 35 // contexts where there is no SurfaceManager (e.g. a renderer process).
36 void RegisterSurfaceIdNamespace(SurfaceManager* manager); 36 void RegisterSurfaceIdNamespace(SurfaceManager* manager);
37 37
38 uint32_t id_namespace() const { return id_namespace_; } 38 uint32_t id_namespace() const { return id_namespace_; }
39 39
40 private: 40 private:
41 const uint32_t id_namespace_; 41 const uint32_t id_namespace_;
42 uint32_t next_id_; 42 uint64_t next_id_;
43 SurfaceManager* manager_; 43 SurfaceManager* manager_;
44 44
45 DISALLOW_COPY_AND_ASSIGN(SurfaceIdAllocator); 45 DISALLOW_COPY_AND_ASSIGN(SurfaceIdAllocator);
46 }; 46 };
47 47
48 } // namespace cc 48 } // namespace cc
49 49
50 #endif // CC_SURFACES_SURFACE_ID_ALLOCATOR_H_ 50 #endif // CC_SURFACES_SURFACE_ID_ALLOCATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698