Bug 1530570 - Inline WebGLContext::IsExtensionEnabled. r=lsalzman
authorJeff Gilbert <jgilbert@mozilla.com>
Tue, 26 Feb 2019 03:28:24 +0000
changeset 518913 9018a6cb05789db2a2f4a09eea3df881a289a37b
parent 518911 110ea2a7c3d4f34b5079c195f7ea57966748e6da
child 518914 4cf427da8ee6c418e6778cd51a6b1029dbcd9af8
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslsalzman
bugs1530570
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1530570 - Inline WebGLContext::IsExtensionEnabled. r=lsalzman Differential Revision: https://phabricator.services.mozilla.com/D21147
dom/canvas/WebGLContext.h
dom/canvas/WebGLContextExtensions.cpp
--- a/dom/canvas/WebGLContext.h
+++ b/dom/canvas/WebGLContext.h
@@ -1580,17 +1580,19 @@ class WebGLContext : public nsICanvasRen
   void EnableExtension(WebGLExtensionID ext);
 
   // Enable an extension if it's supported. Return the extension on success.
   WebGLExtensionBase* EnableSupportedExtension(dom::CallerType callerType,
                                                WebGLExtensionID ext);
 
  public:
   // returns true if the extension has been enabled by calling getExtension.
-  bool IsExtensionEnabled(WebGLExtensionID ext) const;
+  bool IsExtensionEnabled(const WebGLExtensionID ext) const {
+    return mExtensions[ext];
+  }
 
  protected:
   // returns true if the extension is supported for this caller type (this
   // decides what getSupportedExtensions exposes)
   bool IsExtensionSupported(dom::CallerType callerType,
                             WebGLExtensionID ext) const;
   bool IsExtensionSupported(WebGLExtensionID ext) const;
 
--- a/dom/canvas/WebGLContextExtensions.cpp
+++ b/dom/canvas/WebGLContextExtensions.cpp
@@ -65,20 +65,16 @@ namespace mozilla {
     WEBGL_EXTENSION_IDENTIFIER(WEBGL_lose_context)
 
 #undef WEBGL_EXTENSION_IDENTIFIER
   }
 
   return sExtensionNamesEnumeratedArray[ext];
 }
 
-bool WebGLContext::IsExtensionEnabled(WebGLExtensionID ext) const {
-  return mExtensions[ext];
-}
-
 bool WebGLContext::IsExtensionSupported(dom::CallerType callerType,
                                         WebGLExtensionID ext) const {
   bool allowPrivilegedExts = false;
 
   // Chrome contexts need access to debug information even when
   // webgl.disable-extensions is set. This is used in the graphics
   // section of about:support
   if (callerType == dom::CallerType::System) {