Index: gpu/command_buffer/service/feature_info.h |
=================================================================== |
--- gpu/command_buffer/service/feature_info.h (revision 68245) |
+++ gpu/command_buffer/service/feature_info.h (working copy) |
@@ -6,6 +6,7 @@ |
#define GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ |
#include <string> |
+#include <vector> |
#include "gpu/command_buffer/service/gles2_cmd_validation.h" |
namespace gpu { |
@@ -54,14 +55,36 @@ |
return feature_flags_; |
} |
+ // Returns a string containing the extensions that can be |
+ // successfully requested on the current hardware. |
+ const std::string& RequestableExtensions(); |
+ |
private: |
+ // Checks the given extension or extensions for availability. If it |
+ // is available, then if it is desired, should_enable is set to |
+ // true. (No other changes are made in this case.) Otherwise, |
+ // "extension" (and not alternate_extension) is added to the set of |
+ // requestable extensions. |
+ void DoSimpleTestForEnablingExtension( |
greggman
2010/12/04 01:28:44
Why do these take void extension_helper? Why not E
|
+ void* extensions_helper, const char* extension, bool* should_enable); |
+ void DoSimpleTestForEnablingExtension( |
+ void* extensions_helper, const char* extension, |
+ const char* alternate_extension, bool* should_enable); |
+ |
void AddExtensionString(const std::string& str); |
+ void AddRequestableExtensionString(const std::string& str); |
+ void RemoveRequestableExtensionString(const std::string& str); |
Validators validators_; |
// The extensions string returned by glGetString(GL_EXTENSIONS); |
std::string extensions_; |
+ // The list of extensions returned by glGetRequestableExtensionsCHROMIUM(). |
+ std::vector<std::string> requestable_extensions_list_; |
greggman
2010/12/04 01:28:44
why a list and not a set? This would simplify the
|
+ bool requestable_extensions_dirty_; |
+ std::string requestable_extensions_; |
+ |
// Flags for some features |
FeatureFlags feature_flags_; |