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

Unified Diff: cc/resources/texture_uploader.cc

Issue 952893003: Update from https://crrev.com/317530 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix gn for nacl Created 5 years, 10 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/resources/scoped_resource_unittest.cc ('k') | cc/resources/tile.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/texture_uploader.cc
diff --git a/cc/resources/texture_uploader.cc b/cc/resources/texture_uploader.cc
index 3d0f68163c955969364e1abc519a1dd4a7304f1f..601fa8fbff89de41c26075cf1be5d97dff61fdd3 100644
--- a/cc/resources/texture_uploader.cc
+++ b/cc/resources/texture_uploader.cc
@@ -146,14 +146,7 @@ void TextureUploader::Upload(const uint8* image,
if (is_full_upload)
BeginQuery();
- if (format == ETC1) {
- // ETC1 does not support subimage uploads.
- DCHECK(is_full_upload);
- UploadWithTexImageETC1(image, size);
- } else {
- UploadWithMapTexSubImage(
- image, image_rect, source_rect, dest_offset, format);
- }
+ UploadWithMapTexSubImage(image, image_rect, source_rect, dest_offset, format);
if (is_full_upload)
EndQuery();
@@ -291,22 +284,6 @@ void TextureUploader::UploadWithMapTexSubImage(const uint8* image,
gl_->UnmapTexSubImage2DCHROMIUM(pixel_dest);
}
-void TextureUploader::UploadWithTexImageETC1(const uint8* image,
- const gfx::Size& size) {
- TRACE_EVENT0("cc", "TextureUploader::UploadWithTexImageETC1");
- DCHECK_EQ(0, size.width() % 4);
- DCHECK_EQ(0, size.height() % 4);
-
- gl_->CompressedTexImage2D(GL_TEXTURE_2D,
- 0,
- GLInternalFormat(ETC1),
- size.width(),
- size.height(),
- 0,
- Resource::MemorySizeBytes(size, ETC1),
- image);
-}
-
void TextureUploader::ProcessQueries() {
while (!pending_queries_.empty()) {
if (pending_queries_.front()->IsPending())
« no previous file with comments | « cc/resources/scoped_resource_unittest.cc ('k') | cc/resources/tile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698