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

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

Issue 12217102: cc: Avoid power of two textures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Lower-case vendor. Created 7 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/picture_layer_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/feature_info.cc
diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc
index 30c82d714858d7abe23aee867c5e43e07467dd18..06d8444c9cc7ca931eb05896b691219bb1b3067d 100644
--- a/gpu/command_buffer/service/feature_info.cc
+++ b/gpu/command_buffer/service/feature_info.cc
@@ -166,6 +166,7 @@ void FeatureInfo::AddFeatures() {
bool is_amd = false;
bool is_mesa = false;
bool is_qualcomm = false;
+ bool is_imagination = false;
for (size_t ii = 0; ii < arraysize(string_ids); ++ii) {
const char* str = reinterpret_cast<const char*>(
glGetString(string_ids[ii]));
@@ -177,6 +178,7 @@ void FeatureInfo::AddFeatures() {
is_amd |= string_set.Contains("amd") || string_set.Contains("ati");
is_mesa |= string_set.Contains("mesa");
is_qualcomm |= string_set.Contains("qualcomm");
+ is_imagination |= string_set.Contains("imagination");
}
}
@@ -210,6 +212,12 @@ void FeatureInfo::AddFeatures() {
AddExtensionString("GL_CHROMIUM_texture_mailbox");
AddExtensionString("GL_EXT_debug_marker");
+ // Add extension to indicate fast-path texture uploads. This is
+ // for IMG, where everything except async + non-power-of-two +
+ // multiple-of-eight textures are brutally slow.
+ if (is_imagination)
+ AddExtensionString("GL_CHROMIUM_fast_NPOT_MO8_textures");
+
feature_flags_.chromium_stream_texture = true;
// OES_vertex_array_object is emulated if not present natively,
« no previous file with comments | « cc/picture_layer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698