OLD | NEW |
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_FACTORY_H_ | 5 #ifndef CC_SURFACES_SURFACE_FACTORY_H_ |
6 #define CC_SURFACES_SURFACE_FACTORY_H_ | 6 #define CC_SURFACES_SURFACE_FACTORY_H_ |
7 | 7 |
8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "base/containers/scoped_ptr_hash_map.h" | 9 #include "base/containers/scoped_ptr_hash_map.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 48 |
49 SurfaceFactoryClient* client() { return client_; } | 49 SurfaceFactoryClient* client() { return client_; } |
50 | 50 |
51 void ReceiveFromChild(const TransferableResourceArray& resources); | 51 void ReceiveFromChild(const TransferableResourceArray& resources); |
52 void RefResources(const TransferableResourceArray& resources); | 52 void RefResources(const TransferableResourceArray& resources); |
53 void UnrefResources(const ReturnedResourceArray& resources); | 53 void UnrefResources(const ReturnedResourceArray& resources); |
54 | 54 |
55 private: | 55 private: |
56 SurfaceManager* manager_; | 56 SurfaceManager* manager_; |
57 SurfaceFactoryClient* client_; | 57 SurfaceFactoryClient* client_; |
| 58 SurfaceResourceHolder holder_; |
| 59 |
58 typedef base::ScopedPtrHashMap<SurfaceId, Surface> OwningSurfaceMap; | 60 typedef base::ScopedPtrHashMap<SurfaceId, Surface> OwningSurfaceMap; |
59 base::ScopedPtrHashMap<SurfaceId, Surface> surface_map_; | 61 base::ScopedPtrHashMap<SurfaceId, Surface> surface_map_; |
60 | 62 |
61 SurfaceResourceHolder holder_; | |
62 | |
63 DISALLOW_COPY_AND_ASSIGN(SurfaceFactory); | 63 DISALLOW_COPY_AND_ASSIGN(SurfaceFactory); |
64 }; | 64 }; |
65 | 65 |
66 } // namespace cc | 66 } // namespace cc |
67 | 67 |
68 #endif // CC_SURFACES_SURFACE_FACTORY_H_ | 68 #endif // CC_SURFACES_SURFACE_FACTORY_H_ |
OLD | NEW |