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

Unified Diff: cc/resources/resource_provider.h

Issue 13445009: cc: Move video upload to VideoResourceUpdater. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix software compositing Created 7 years, 8 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
Index: cc/resources/resource_provider.h
diff --git a/cc/resources/resource_provider.h b/cc/resources/resource_provider.h
index 56daa3e534f5eb37fc009e88a91a9b3d061ef903..641b2ff2c1d68fe69684fa2555d9480404d764e5 100644
--- a/cc/resources/resource_provider.h
+++ b/cc/resources/resource_provider.h
@@ -14,6 +14,7 @@
#include "base/callback.h"
#include "base/hash_tables.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "base/threading/thread_checker.h"
#include "cc/base/cc_export.h"
#include "cc/output/context_provider.h"
@@ -39,8 +40,11 @@ namespace cc {
class TextureUploader;
// This class is not thread-safe and can only be called from the thread it was
-// created on (in practice, the impl thread).
-class CC_EXPORT ResourceProvider {
+// created on (in practice, the impl thread). It supports WeakPtr in order to
+// tell when the provider and the context it holds is destroyed and no longer
+// usable.
+class CC_EXPORT ResourceProvider
+ : public base::SupportsWeakPtr<ResourceProvider> {
piman 2013/04/08 21:03:47 Will the VideoResourceUpdater outlive the layer? I
danakj 2013/04/08 21:44:56 Removed this as per offline convo. The callback is
public:
typedef unsigned ResourceId;
typedef std::vector<ResourceId> ResourceIdArray;

Powered by Google App Engine
This is Rietveld 408576698