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

Unified Diff: cc/scheduler/texture_uploader.h

Issue 105103004: Convert cc resource system over to GLES2Interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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/resources/video_resource_updater.cc ('k') | cc/scheduler/texture_uploader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/texture_uploader.h
diff --git a/cc/scheduler/texture_uploader.h b/cc/scheduler/texture_uploader.h
index 77c44490dfd3e85f7f95c27518479056756c4a69..815282e2c4b6372b22322cf74aedff5ddf0d415f 100644
--- a/cc/scheduler/texture_uploader.h
+++ b/cc/scheduler/texture_uploader.h
@@ -13,21 +13,24 @@
#include "cc/base/scoped_ptr_deque.h"
#include "cc/resources/resource_provider.h"
-namespace blink { class WebGraphicsContext3D; }
-
namespace gfx {
class Rect;
class Size;
class Vector2d;
}
+namespace gpu {
+namespace gles2 {
+class GLES2Interface;
+}
+}
+
namespace cc {
class CC_EXPORT TextureUploader {
public:
- static scoped_ptr<TextureUploader>
- Create(blink::WebGraphicsContext3D* context) {
- return make_scoped_ptr(new TextureUploader(context));
+ static scoped_ptr<TextureUploader> Create(gpu::gles2::GLES2Interface* gl) {
+ return make_scoped_ptr(new TextureUploader(gl));
}
~TextureUploader();
@@ -52,8 +55,8 @@ class CC_EXPORT TextureUploader {
private:
class Query {
public:
- static scoped_ptr<Query> Create(blink::WebGraphicsContext3D* context) {
- return make_scoped_ptr(new Query(context));
+ static scoped_ptr<Query> Create(gpu::gles2::GLES2Interface* gl) {
+ return make_scoped_ptr(new Query(gl));
}
virtual ~Query();
@@ -71,9 +74,9 @@ class CC_EXPORT TextureUploader {
}
private:
- explicit Query(blink::WebGraphicsContext3D* context);
+ explicit Query(gpu::gles2::GLES2Interface* gl);
- blink::WebGraphicsContext3D* context_;
+ gpu::gles2::GLES2Interface* gl_;
unsigned query_id_;
unsigned value_;
bool has_value_;
@@ -82,7 +85,7 @@ class CC_EXPORT TextureUploader {
DISALLOW_COPY_AND_ASSIGN(Query);
};
- explicit TextureUploader(blink::WebGraphicsContext3D* context);
+ explicit TextureUploader(gpu::gles2::GLES2Interface* gl);
void BeginQuery();
void EndQuery();
@@ -100,7 +103,7 @@ class CC_EXPORT TextureUploader {
ResourceFormat format);
void UploadWithTexImageETC1(const uint8* image, gfx::Size size);
- blink::WebGraphicsContext3D* context_;
+ gpu::gles2::GLES2Interface* gl_;
ScopedPtrDeque<Query> pending_queries_;
ScopedPtrDeque<Query> available_queries_;
std::multiset<double> textures_per_second_history_;
« no previous file with comments | « cc/resources/video_resource_updater.cc ('k') | cc/scheduler/texture_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698