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

Unified Diff: cc/resources/resource_provider.cc

Issue 1379783002: Allow one-copy task tile worker pool to use compressed textures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use memory_efficient_format* settings and revert allocation modifications Created 5 years, 1 month 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.cc
diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc
index 506d1d97954cd14f49c1a8422c5987a6519288c3..c728f65a9d78924da119f8dc8b71cb2e20ded5ae 100644
--- a/cc/resources/resource_provider.cc
+++ b/cc/resources/resource_provider.cc
@@ -1503,7 +1503,6 @@ void ResourceProvider::LazyAllocate(Resource* resource) {
LazyCreate(resource);
if (!resource->gl_id)
return;
- resource->allocated = true;
GLES2Interface* gl = ContextGL();
gfx::Size& size = resource->size;
ResourceFormat format = resource->format;
@@ -1523,12 +1522,14 @@ void ResourceProvider::LazyAllocate(Resource* resource) {
GLenum storage_format = TextureToStorageFormat(format);
gl->TexStorage2DEXT(resource->target, 1, storage_format, size.width(),
size.height());
+ resource->allocated = true;
} else {
// ETC1 does not support preallocation.
if (format != ETC1) {
gl->TexImage2D(resource->target, 0, GLInternalFormat(format),
size.width(), size.height(), 0, GLDataFormat(format),
GLDataType(format), NULL);
+ resource->allocated = true;
}
}
}

Powered by Google App Engine
This is Rietveld 408576698