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

Unified Diff: cc/CCResourceProvider.h

Issue 10917251: Move TextureCopier and TextureUploader from CCRenderer to CCResourceProvider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix rebase merge issues Created 8 years, 3 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/CCRendererGL.cpp ('k') | cc/CCResourceProvider.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CCResourceProvider.h
diff --git a/cc/CCResourceProvider.h b/cc/CCResourceProvider.h
index bb01e85c958d4888b9c0dddde28cf8aefbc08ed6..83f27efddafedb0cd7b711b1e5e49b56a4cb9b1e 100644
--- a/cc/CCResourceProvider.h
+++ b/cc/CCResourceProvider.h
@@ -11,6 +11,7 @@
#include "IntSize.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
+#include "TextureCopier.h"
#include <wtf/Deque.h>
#include <wtf/HashMap.h>
#include <wtf/OwnPtr.h>
@@ -25,8 +26,12 @@ class WebGraphicsContext3D;
namespace cc {
+enum TextureUploaderOption { ThrottledUploader, UnthrottledUploader };
+
class IntRect;
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).
@@ -56,11 +61,13 @@ public:
unsigned syncPoint;
};
- static PassOwnPtr<CCResourceProvider> create(CCGraphicsContext*);
+ static PassOwnPtr<CCResourceProvider> create(CCGraphicsContext*, TextureUploaderOption);
virtual ~CCResourceProvider();
WebKit::WebGraphicsContext3D* graphicsContext3D();
+ TextureUploader* textureUploader() const { return m_textureUploader.get(); }
+ TextureCopier* textureCopier() const { return m_textureCopier.get(); }
int maxTextureSize() const { return m_maxTextureSize; }
unsigned numResources() const { return m_resources.size(); }
@@ -257,7 +264,7 @@ private:
typedef HashMap<int, Child> ChildMap;
explicit CCResourceProvider(CCGraphicsContext*);
- bool initialize();
+ bool initialize(TextureUploaderOption);
const Resource* lockForRead(ResourceId);
void unlockForRead(ResourceId);
@@ -281,6 +288,8 @@ private:
bool m_useTextureUsageHint;
bool m_useShallowFlush;
OwnPtr<LayerTextureSubImage> m_texSubImage;
+ OwnPtr<TextureUploader> m_textureUploader;
+ OwnPtr<AcceleratedTextureCopier> m_textureCopier;
int m_maxTextureSize;
};
« no previous file with comments | « cc/CCRendererGL.cpp ('k') | cc/CCResourceProvider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698