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

Unified Diff: Source/core/html/canvas/WebGLRenderingContextBase.h

Issue 205903004: WebGL: Return both unprefixed and prefixed supported names from getSupportedExtensions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Explain meaning of EnabledDraftExtension better Created 6 years, 9 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
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];
« no previous file with comments | « Source/core/html/canvas/WebGLRenderingContext.cpp ('k') | Source/core/html/canvas/WebGLRenderingContextBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698