diff options
author | jbauman <jbauman@chromium.org> | 2014-10-31 15:46:17 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-31 22:46:35 +0000 |
commit | fda1c1146ba1944abd2c032ef25cf2f4d35e49c0 (patch) | |
tree | 119d250a918270aaae9ecd22e5c04985721e8a9f /cc/surfaces/surface_factory.h | |
parent | a713479270ad0ed2b4827eda0268eb9d265a85de (diff) | |
download | chromium_src-fda1c1146ba1944abd2c032ef25cf2f4d35e49c0.zip chromium_src-fda1c1146ba1944abd2c032ef25cf2f4d35e49c0.tar.gz chromium_src-fda1c1146ba1944abd2c032ef25cf2f4d35e49c0.tar.bz2 |
LOG and clear SurfaceFactory if it isn't empty on destruction.
Otherwise it will leave dangling pointers in the SurfaceManager. Also add a DestroyAll method to allow owners to ensure every surface in the factory is destroyed.
BUG=428127
Review URL: https://codereview.chromium.org/693623004
Cr-Commit-Position: refs/heads/master@{#302339}
Diffstat (limited to 'cc/surfaces/surface_factory.h')
-rw-r--r-- | cc/surfaces/surface_factory.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cc/surfaces/surface_factory.h b/cc/surfaces/surface_factory.h index 3eb4f43..13d1d63 100644 --- a/cc/surfaces/surface_factory.h +++ b/cc/surfaces/surface_factory.h @@ -5,6 +5,8 @@ #ifndef CC_SURFACES_SURFACE_FACTORY_H_ #define CC_SURFACES_SURFACE_FACTORY_H_ +#include <set> + #include "base/callback_forward.h" #include "base/containers/scoped_ptr_hash_map.h" #include "base/memory/scoped_ptr.h" @@ -40,6 +42,7 @@ class CC_SURFACES_EXPORT SurfaceFactory void Destroy(SurfaceId surface_id); void DestroyOnSequence(SurfaceId surface_id, const std::set<SurfaceSequence>& dependency_set); + void DestroyAll(); // A frame can only be submitted to a surface created by this factory, // although the frame may reference surfaces created by other factories. // The callback is called the first time this frame is used to draw. |