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

Unified Diff: cc/resource_provider.h

Issue 11232051: Remove static thread pointers from CC (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to 165064 Created 8 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
Index: cc/resource_provider.h
diff --git a/cc/resource_provider.h b/cc/resource_provider.h
index 3b66f9b5f44e53cb635b9734fca2a1d485732df0..0030e5f7b4d1942f1e469258073c09174cf1d2d7 100644
--- a/cc/resource_provider.h
+++ b/cc/resource_provider.h
@@ -9,6 +9,7 @@
#include "base/basictypes.h"
#include "base/hash_tables.h"
#include "base/memory/scoped_ptr.h"
+#include "base/threading/thread_checker.h"
#include "cc/graphics_context.h"
#include "cc/texture_copier.h"
#include "third_party/khronos/GLES2/gl2.h"
@@ -28,8 +29,8 @@ class LayerTextureSubImage;
class TextureCopier;
class TextureUploader;
-// Thread-safety notes: this class is not thread-safe and can only be called
-// from the thread it was created on (in practice, the compositor thread).
+// This class is not thread-safe and can only be called from the thread it was
+// created on (in practice, the impl thread).
class ResourceProvider {
public:
typedef unsigned ResourceId;
@@ -245,7 +246,7 @@ private:
};
typedef base::hash_map<int, Child> ChildMap;
- explicit ResourceProvider(GraphicsContext*);
+ ResourceProvider(GraphicsContext*);
jamesr 2012/10/31 04:42:13 think we still want explicit
bool initialize();
const Resource* lockForRead(ResourceId);
@@ -274,6 +275,8 @@ private:
scoped_ptr<AcceleratedTextureCopier> m_textureCopier;
int m_maxTextureSize;
+ base::ThreadChecker m_threadChecker;
+
DISALLOW_COPY_AND_ASSIGN(ResourceProvider);
};

Powered by Google App Engine
This is Rietveld 408576698