Index: Source/core/html/canvas/WebGLRenderingContextBase.h |
diff --git a/Source/core/html/canvas/WebGLRenderingContextBase.h b/Source/core/html/canvas/WebGLRenderingContextBase.h |
index 3914fc53fa8ea0aaae36231f8f3144f0f24aabd2..a7e25a17cf1aa183cfe533dea19044fd5b10fd4a 100644 |
--- a/Source/core/html/canvas/WebGLRenderingContextBase.h |
+++ b/Source/core/html/canvas/WebGLRenderingContextBase.h |
@@ -533,10 +533,13 @@ protected: |
OwnPtr<Extensions3DUtil> m_extensionsUtil; |
enum ExtensionFlags { |
- ApprovedExtension = 0x00, |
- DraftExtension = 0x01, |
- PrivilegedExtension = 0x02, |
- PrefixedExtension = 0x04, |
+ ApprovedExtension = 0x00, |
+ // Extension that is behind the draft extensions runtime flag: |
+ DraftExtension = 0x01, |
+ PrivilegedExtension = 0x02, |
+ // Extension that is still in draft state, but has been selectively enabled by default under a prefix. Do not use |
+ // this for enabling new draft extensions; use the DraftExtension flag instead, and do not use vendor prefixes: |
+ EnabledDraftExtension = 0x04, |
WebGLDebugRendererInfoExtension = 0x08, |
}; |
@@ -545,7 +548,6 @@ protected: |
ExtensionTracker(ExtensionFlags flags, const char* const* prefixes) |
: m_privileged(flags & PrivilegedExtension) |
, m_draft(flags & DraftExtension) |
- , m_prefixed(flags & PrefixedExtension) |
, m_webglDebugRendererInfo(flags & WebGLDebugRendererInfoExtension) |
, m_prefixes(prefixes) |
{ |
@@ -555,11 +557,6 @@ protected: |
{ |
} |
- bool prefixed() const |
- { |
- return m_prefixed; |
- } |
- |
bool privileged() const |
{ |
return m_privileged; |
@@ -575,6 +572,7 @@ protected: |
return m_webglDebugRendererInfo; |
} |
+ const char* const* prefixes() const; |
bool matchesNameWithPrefixes(const String&) const; |
virtual PassRefPtr<WebGLExtension> getExtension(WebGLRenderingContextBase*) = 0; |
@@ -585,7 +583,6 @@ protected: |
private: |
bool m_privileged; |
bool m_draft; |
- bool m_prefixed; |
bool m_webglDebugRendererInfo; |
const char* const* m_prefixes; |
}; |
@@ -653,6 +650,8 @@ protected: |
m_extensions.append(new TypedExtensionTracker<T>(extensionPtr, flags, prefixes)); |
} |
+ bool extensionSupportedAndAllowed(const ExtensionTracker*); |
+ |
inline bool extensionEnabled(WebGLExtensionName name) |
{ |
return m_extensionEnabled[name]; |