Chromium Code Reviews| Index: cc/surfaces/surface_factory.h |
| diff --git a/cc/surfaces/surface_factory.h b/cc/surfaces/surface_factory.h |
| index 3a6431596bc9cc470e8ef4fdbae1520988543e14..96852b87c4aa259a3bde3534ff9c2aaf5f2b0098 100644 |
| --- a/cc/surfaces/surface_factory.h |
| +++ b/cc/surfaces/surface_factory.h |
| @@ -13,6 +13,7 @@ |
| #include "base/macros.h" |
| #include "base/memory/weak_ptr.h" |
| #include "base/observer_list.h" |
| +#include "base/optional.h" |
| #include "cc/output/compositor_frame.h" |
| #include "cc/surfaces/surface_id.h" |
| #include "cc/surfaces/surface_resource_holder.h" |
| @@ -46,12 +47,8 @@ class CC_SURFACES_EXPORT SurfaceFactory { |
| const FrameSinkId& frame_sink_id() const { return frame_sink_id_; } |
| - void Create(const LocalFrameId& local_frame_id); |
| - void Destroy(const LocalFrameId& local_frame_id); |
| // Destroys all surfaces. |
| - void DestroyAll(); |
| - |
| // Destroys and disown all surfaces, and reset all resource references. This |
| // is useful when resources are invalid (e.g. lost context). |
| void Reset(); |
| @@ -93,11 +90,15 @@ class CC_SURFACES_EXPORT SurfaceFactory { |
| private: |
| FrameSinkId frame_sink_id_; |
| + base::Optional<LocalFrameId> last_local_frame_id_; |
|
Fady Samuel
2016/11/10 23:33:36
why is this optional? If last_local_frame_id_ isn'
Saman Sami
2016/11/11 17:49:58
Done.
|
| SurfaceManager* manager_; |
| SurfaceFactoryClient* client_; |
| SurfaceResourceHolder holder_; |
| bool needs_sync_points_; |
| + void Create(const LocalFrameId& local_frame_id); |
| + void Destroy(const LocalFrameId& local_frame_id); |
| + void DestroyAll(); |
| using OwningSurfaceMap = std:: |
| unordered_map<LocalFrameId, std::unique_ptr<Surface>, LocalFrameIdHash>; |