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

Unified Diff: cc/scheduler/texture_uploader.h

Issue 27973002: cc: Adding ETC1 support to UIResourceBitmap and ResourceProvider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments, added test, dcheck for compressed texture availability Created 7 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/scheduler/texture_uploader.h
diff --git a/cc/scheduler/texture_uploader.h b/cc/scheduler/texture_uploader.h
index a131ba04f9e204561c60a126909f70254c9b87ac..94da3961dfc81404f0662c10c1cedada7db5f6f7 100644
--- a/cc/scheduler/texture_uploader.h
+++ b/cc/scheduler/texture_uploader.h
@@ -28,9 +28,12 @@ class CC_EXPORT TextureUploader {
static scoped_ptr<TextureUploader> Create(
WebKit::WebGraphicsContext3D* context,
bool use_map_tex_sub_image,
- bool use_shallow_flush) {
- return make_scoped_ptr(
- new TextureUploader(context, use_map_tex_sub_image, use_shallow_flush));
+ bool use_shallow_flush,
+ bool use_compressed_texture_etc1) {
+ return make_scoped_ptr(new TextureUploader(context,
+ use_map_tex_sub_image,
+ use_shallow_flush,
+ use_compressed_texture_etc1));
}
~TextureUploader();
@@ -87,7 +90,8 @@ class CC_EXPORT TextureUploader {
TextureUploader(WebKit::WebGraphicsContext3D* context,
bool use_map_tex_sub_image,
- bool use_shallow_flush);
+ bool use_shallow_flush,
+ bool use_compressed_texture_etc1);
void BeginQuery();
void EndQuery();
@@ -103,6 +107,11 @@ class CC_EXPORT TextureUploader {
gfx::Rect source_rect,
gfx::Vector2d dest_offset,
ResourceFormat format);
+ void UploadWithTexSubImageETC1(const uint8* image,
+ gfx::Rect image_rect,
+ gfx::Rect source_rect,
+ gfx::Vector2d dest_offset,
+ ResourceFormat format);
WebKit::WebGraphicsContext3D* context_;
ScopedPtrDeque<Query> pending_queries_;
@@ -117,6 +126,8 @@ class CC_EXPORT TextureUploader {
bool use_shallow_flush_;
size_t num_texture_uploads_since_last_flush_;
+ bool use_compressed_texture_etc1_;
+
DISALLOW_COPY_AND_ASSIGN(TextureUploader);
};

Powered by Google App Engine
This is Rietveld 408576698