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 <memory> | 8 #include <memory> |
9 #include <set> | 9 #include <set> |
10 #include <unordered_map> | 10 #include <unordered_map> |
11 | 11 |
12 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
16 #include "cc/output/compositor_frame.h" | 16 #include "cc/output/compositor_frame.h" |
17 #include "cc/surfaces/surface_id.h" | 17 #include "cc/surfaces/surface_id.h" |
18 #include "cc/surfaces/surface_resource_holder.h" | 18 #include "cc/surfaces/surface_resource_holder.h" |
19 #include "cc/surfaces/surface_sequence.h" | 19 #include "cc/surfaces/surface_sequence.h" |
20 #include "cc/surfaces/surfaces_export.h" | 20 #include "cc/surfaces/surfaces_export.h" |
21 | 21 |
22 namespace gfx { | |
23 class Size; | |
24 } | |
25 | |
26 namespace cc { | 22 namespace cc { |
27 class BeginFrameSource; | |
28 class CopyOutputRequest; | 23 class CopyOutputRequest; |
29 class Surface; | 24 class Surface; |
30 class SurfaceFactoryClient; | 25 class SurfaceFactoryClient; |
31 class SurfaceManager; | 26 class SurfaceManager; |
32 | 27 |
33 // A SurfaceFactory is used to create surfaces that may share resources and | 28 // A SurfaceFactory is used to create surfaces that may share resources and |
34 // receive returned resources for frames submitted to those surfaces. Resources | 29 // receive returned resources for frames submitted to those surfaces. Resources |
35 // submitted to frames created by a particular factory will be returned to that | 30 // submitted to frames created by a particular factory will be returned to that |
36 // factory's client when they are no longer being used. This is the only class | 31 // factory's client when they are no longer being used. This is the only class |
37 // most users of surfaces will need to directly interact with. | 32 // most users of surfaces will need to directly interact with. |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 OwningSurfaceMap surface_map_; | 99 OwningSurfaceMap surface_map_; |
105 | 100 |
106 base::WeakPtrFactory<SurfaceFactory> weak_factory_; | 101 base::WeakPtrFactory<SurfaceFactory> weak_factory_; |
107 | 102 |
108 DISALLOW_COPY_AND_ASSIGN(SurfaceFactory); | 103 DISALLOW_COPY_AND_ASSIGN(SurfaceFactory); |
109 }; | 104 }; |
110 | 105 |
111 } // namespace cc | 106 } // namespace cc |
112 | 107 |
113 #endif // CC_SURFACES_SURFACE_FACTORY_H_ | 108 #endif // CC_SURFACES_SURFACE_FACTORY_H_ |
OLD | NEW |