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

Unified Diff: gpu/command_buffer/service/texture_manager.cc

Issue 2479513002: Reland of Extend CopyTextureCHROMIUM to more ES 3.0 texture formats. (Closed)
Patch Set: full path Created 4 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: gpu/command_buffer/service/texture_manager.cc
diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc
index dd7d59c5474322fc89ea5fda5158825e06723381..fc1f21099d2daf0535e3e56b039fbb2b1d040f99 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -785,11 +785,14 @@ bool Texture::CanGenerateMipmaps(const FeatureInfo* feature_info) const {
return false;
}
- if (!Texture::ColorRenderable(feature_info, base.internal_format,
- immutable_) ||
- !Texture::TextureFilterable(feature_info, base.internal_format, base.type,
- immutable_)) {
- return false;
+ if (!feature_info->validators()->texture_unsized_internal_format.IsValid(
+ base.internal_format)) {
+ if (!Texture::ColorRenderable(feature_info, base.internal_format,
+ immutable_) ||
+ !Texture::TextureFilterable(feature_info, base.internal_format,
+ base.type, immutable_)) {
+ return false;
+ }
}
for (size_t ii = 0; ii < face_infos_.size(); ++ii) {
@@ -869,7 +872,8 @@ bool Texture::ColorRenderable(const FeatureInfo* feature_info,
bool immutable) {
if (feature_info->validators()->texture_unsized_internal_format.IsValid(
internal_format)) {
- return true;
+ return internal_format == GL_RGBA || internal_format == GL_RGB ||
+ internal_format == GL_BGRA_EXT;
}
return SizedFormatAvailable(feature_info, immutable, internal_format) &&

Powered by Google App Engine
This is Rietveld 408576698