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

Unified Diff: cc/resources/resource_provider.cc

Issue 1535953003: Revert of Allow one-copy task tile worker pool to use compressed textures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/resource_provider.h ('k') | cc/test/layer_tree_pixel_resource_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_provider.cc
diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc
index a50ad72c203bf560bf809c3080075233be2ced3f..506d1d97954cd14f49c1a8422c5987a6519288c3 100644
--- a/cc/resources/resource_provider.cc
+++ b/cc/resources/resource_provider.cc
@@ -368,29 +368,6 @@
gl->Finish();
}
-bool ResourceProvider::IsResourceFormatSupported(ResourceFormat format) const {
- const ContextProvider::Capabilities& caps =
- output_surface_->context_provider()->ContextCapabilities();
-
- switch (format) {
- case ALPHA_8:
- case RGBA_4444:
- case RGBA_8888:
- case RGB_565:
- case LUMINANCE_8:
- return true;
- case BGRA_8888:
- return caps.gpu.texture_format_bgra8888;
- case ETC1:
- return caps.gpu.texture_format_etc1;
- case RED_8:
- return caps.gpu.texture_rg;
- }
-
- NOTREACHED();
- return false;
-}
-
bool ResourceProvider::InUseByConsumer(ResourceId id) {
Resource* resource = GetResource(id);
return resource->lock_for_read_count > 0 || resource->exported_count > 0 ||
@@ -1090,10 +1067,10 @@
max_texture_size_ = 0; // Context expects cleared value.
gl->GetIntegerv(GL_MAX_TEXTURE_SIZE, &max_texture_size_);
best_texture_format_ =
- PlatformColor::BestSupportedTextureFormat(use_texture_format_bgra_);
-
- best_render_buffer_format_ = PlatformColor::BestSupportedTextureFormat(
- caps.gpu.render_buffer_format_bgra8888);
+ PlatformColor::BestTextureFormat(use_texture_format_bgra_);
+
+ best_render_buffer_format_ =
+ PlatformColor::BestTextureFormat(caps.gpu.render_buffer_format_bgra8888);
texture_id_allocator_.reset(
new TextureIdAllocator(gl, id_allocation_chunk_size_));
« no previous file with comments | « cc/resources/resource_provider.h ('k') | cc/test/layer_tree_pixel_resource_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698