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

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

Issue 2102123002: Make Satisfy/Require callbacks pass Surface id and sequence by reference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 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
« no previous file with comments | « cc/surfaces/surface_factory_client.h ('k') | components/exo/surface.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 19 matching lines...) Expand all
30 // When this SurfaceIdAllocator is destroyed, its namespace is 30 // When this SurfaceIdAllocator is destroyed, its namespace is
31 // automatically invalidated and any remaining sequences with that 31 // automatically invalidated and any remaining sequences with that
32 // namespace will be ignored. This method does not need to be called in 32 // namespace will be ignored. This method does not need to be called in
33 // contexts where there is no SurfaceManager (e.g. a renderer process). 33 // contexts where there is no SurfaceManager (e.g. a renderer process).
34 void RegisterSurfaceIdNamespace(SurfaceManager* manager); 34 void RegisterSurfaceIdNamespace(SurfaceManager* manager);
35 35
36 uint32_t id_namespace() const { return id_namespace_; } 36 uint32_t id_namespace() const { return id_namespace_; }
37 37
38 // SurfaceIdAllocator's owner can call this when it find out that 38 // SurfaceIdAllocator's owner can call this when it find out that
39 // SurfaceManager is no longer alive during destruction. 39 // SurfaceManager is no longer alive during destruction.
40 void didDestroySurfaceManager() { manager_ = nullptr; } 40 void DidDestroySurfaceManager() { manager_ = nullptr; }
41 41
42 private: 42 private:
43 const uint32_t id_namespace_; 43 const uint32_t id_namespace_;
44 uint32_t next_id_; 44 uint32_t next_id_;
45 SurfaceManager* manager_; 45 SurfaceManager* manager_;
46 46
47 DISALLOW_COPY_AND_ASSIGN(SurfaceIdAllocator); 47 DISALLOW_COPY_AND_ASSIGN(SurfaceIdAllocator);
48 }; 48 };
49 49
50 } // namespace cc 50 } // namespace cc
51 51
52 #endif // CC_SURFACES_SURFACE_ID_ALLOCATOR_H_ 52 #endif // CC_SURFACES_SURFACE_ID_ALLOCATOR_H_
OLDNEW
« no previous file with comments | « cc/surfaces/surface_factory_client.h ('k') | components/exo/surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698