Chromium Code Reviews| 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 <set> | 8 #include <set> |
| 9 #include <unordered_map> | |
| 9 | 10 |
| 10 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
| 11 #include "base/containers/scoped_ptr_hash_map.h" | 12 #include "base/containers/scoped_ptr_hash_map.h" |
| 12 #include "base/macros.h" | 13 #include "base/macros.h" |
| 13 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 15 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
| 16 #include "cc/output/compositor_frame.h" | 17 #include "cc/output/compositor_frame.h" |
| 17 #include "cc/surfaces/surface_id.h" | 18 #include "cc/surfaces/surface_id.h" |
| 18 #include "cc/surfaces/surface_resource_holder.h" | 19 #include "cc/surfaces/surface_resource_holder.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 78 bool needs_sync_points() const { return needs_sync_points_; } | 79 bool needs_sync_points() const { return needs_sync_points_; } |
| 79 void set_needs_sync_points(bool needs) { needs_sync_points_ = needs; } | 80 void set_needs_sync_points(bool needs) { needs_sync_points_ = needs; } |
| 80 | 81 |
| 81 private: | 82 private: |
| 82 SurfaceManager* manager_; | 83 SurfaceManager* manager_; |
| 83 SurfaceFactoryClient* client_; | 84 SurfaceFactoryClient* client_; |
| 84 SurfaceResourceHolder holder_; | 85 SurfaceResourceHolder holder_; |
| 85 | 86 |
| 86 bool needs_sync_points_; | 87 bool needs_sync_points_; |
| 87 | 88 |
| 88 typedef base::ScopedPtrHashMap<SurfaceId, scoped_ptr<Surface>> | 89 typedef std::unordered_map<SurfaceId, scoped_ptr<Surface>, SurfaceIdHash> |
|
danakj
2016/01/26 23:53:32
can you switch this to "using" instead of "typedef
lfg
2016/01/27 00:53:14
Done.
| |
| 89 OwningSurfaceMap; | 90 OwningSurfaceMap; |
| 90 OwningSurfaceMap surface_map_; | 91 OwningSurfaceMap surface_map_; |
| 91 | 92 |
| 92 DISALLOW_COPY_AND_ASSIGN(SurfaceFactory); | 93 DISALLOW_COPY_AND_ASSIGN(SurfaceFactory); |
| 93 }; | 94 }; |
| 94 | 95 |
| 95 } // namespace cc | 96 } // namespace cc |
| 96 | 97 |
| 97 #endif // CC_SURFACES_SURFACE_FACTORY_H_ | 98 #endif // CC_SURFACES_SURFACE_FACTORY_H_ |
| OLD | NEW |