Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3812)

Unified Diff: cc/surfaces/surface_factory.h

Issue 553213003: Avoid destroying surface before the parent surface stops referencing it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/surfaces/surface.cc ('k') | cc/surfaces/surface_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_factory.h
diff --git a/cc/surfaces/surface_factory.h b/cc/surfaces/surface_factory.h
index 2516015f506e9ff10ff54de2fd647f3d2f679555..3eb4f4382e60faaf36a1ffd87d084e7f125dcdc4 100644
--- a/cc/surfaces/surface_factory.h
+++ b/cc/surfaces/surface_factory.h
@@ -11,6 +11,7 @@
#include "base/memory/weak_ptr.h"
#include "cc/surfaces/surface_id.h"
#include "cc/surfaces/surface_resource_holder.h"
+#include "cc/surfaces/surface_sequence.h"
#include "cc/surfaces/surfaces_export.h"
namespace gfx {
@@ -37,6 +38,8 @@ class CC_SURFACES_EXPORT SurfaceFactory
void Create(SurfaceId surface_id, const gfx::Size& size);
void Destroy(SurfaceId surface_id);
+ void DestroyOnSequence(SurfaceId surface_id,
+ const std::set<SurfaceSequence>& dependency_set);
// 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.
@@ -52,6 +55,8 @@ class CC_SURFACES_EXPORT SurfaceFactory
void RefResources(const TransferableResourceArray& resources);
void UnrefResources(const ReturnedResourceArray& resources);
+ SurfaceManager* manager() { return manager_; }
+
private:
SurfaceManager* manager_;
SurfaceFactoryClient* client_;
« no previous file with comments | « cc/surfaces/surface.cc ('k') | cc/surfaces/surface_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698