Bug 1265676 - Fix other callsites. - r=ethlin draft
authorJeff Gilbert <jgilbert@mozilla.com>
Mon, 06 Jun 2016 13:43:18 -0700
changeset 375871 74c4d68c8b65804f2bfb8788b8686c1ac58b7344
parent 375870 28029a3e13cfeb12ac84207a67855759d511b0ce
child 522991 b0931bc71fb804d14fb59b52e6a27e5355089c44
push id20405
push userbmo:jgilbert@mozilla.com
push dateMon, 06 Jun 2016 20:45:46 +0000
reviewersethlin
bugs1265676
milestone49.0a1
Bug 1265676 - Fix other callsites. - r=ethlin MozReview-Commit-ID: EgLMZajmRnD
dom/canvas/WebGLContext.cpp
dom/canvas/WebGLExtensionColorBufferFloat.cpp
dom/canvas/WebGLExtensionColorBufferHalfFloat.cpp
dom/canvas/WebGLExtensionDepthTexture.cpp
dom/canvas/WebGLExtensionEXTColorBufferFloat.cpp
dom/canvas/WebGLExtensionSRGB.cpp
dom/canvas/WebGLFramebuffer.cpp
dom/canvas/WebGLTexture.cpp
--- a/dom/canvas/WebGLContext.cpp
+++ b/dom/canvas/WebGLContext.cpp
@@ -2135,17 +2135,17 @@ ZeroTextureData(WebGLContext* webgl, con
             return false;
 
         return true;
     }
 
     const auto driverUnpackInfo = usage->idealUnpack;
     MOZ_RELEASE_ASSERT(driverUnpackInfo);
 
-    if (usage->isRenderable && depth == 1 &&
+    if (usage->IsRenderable() && depth == 1 &&
         !xOffset && !yOffset && !zOffset)
     {
         // While we would like to skip the extra complexity of trying to zero with an FB
         // clear, ANGLE_depth_texture requires this.
         do {
             if (respecifyTexture) {
                 const auto error = DoTexImage(gl, target, level, driverUnpackInfo, width,
                                               height, depth, nullptr);
--- a/dom/canvas/WebGLExtensionColorBufferFloat.cpp
+++ b/dom/canvas/WebGLExtensionColorBufferFloat.cpp
@@ -19,17 +19,17 @@ WebGLExtensionColorBufferFloat::WebGLExt
     : WebGLExtensionBase(webgl)
 {
     MOZ_ASSERT(IsSupported(webgl), "Don't construct extension if unsupported.");
 
     auto& fua = webgl->mFormatUsage;
 
     auto fnUpdateUsage = [&fua](GLenum sizedFormat, webgl::EffectiveFormat effFormat) {
         auto usage = fua->EditUsage(effFormat);
-        usage->isRenderable = true;
+        usage->SetRenderable();
         fua->AllowRBFormat(sizedFormat, usage);
     };
 
 #define FOO(x) fnUpdateUsage(LOCAL_GL_ ## x, webgl::EffectiveFormat::x)
 
     // The extension doesn't actually add RGB32F; only RGBA32F.
     FOO(RGBA32F);
 
--- a/dom/canvas/WebGLExtensionColorBufferHalfFloat.cpp
+++ b/dom/canvas/WebGLExtensionColorBufferHalfFloat.cpp
@@ -19,17 +19,17 @@ WebGLExtensionColorBufferHalfFloat::WebG
     : WebGLExtensionBase(webgl)
 {
     MOZ_ASSERT(IsSupported(webgl), "Don't construct extension if unsupported.");
 
     auto& fua = webgl->mFormatUsage;
 
     auto fnUpdateUsage = [&fua](GLenum sizedFormat, webgl::EffectiveFormat effFormat) {
         auto usage = fua->EditUsage(effFormat);
-        usage->isRenderable = true;
+        usage->SetRenderable();
         fua->AllowRBFormat(sizedFormat, usage);
     };
 
 #define FOO(x) fnUpdateUsage(LOCAL_GL_ ## x, webgl::EffectiveFormat::x)
 
     FOO(RGBA16F);
     FOO(RGB16F);
 
--- a/dom/canvas/WebGLExtensionDepthTexture.cpp
+++ b/dom/canvas/WebGLExtensionDepthTexture.cpp
@@ -14,17 +14,17 @@ WebGLExtensionDepthTexture::WebGLExtensi
     : WebGLExtensionBase(webgl)
 {
     auto& fua = webgl->mFormatUsage;
 
     const auto fnAdd = [&fua](webgl::EffectiveFormat effFormat, GLenum unpackFormat,
                               GLenum unpackType)
     {
         auto usage = fua->EditUsage(effFormat);
-        usage->isRenderable = true;
+        usage->SetRenderable();
 
         const webgl::PackingInfo pi = {unpackFormat, unpackType};
         const webgl::DriverUnpackInfo dui = {unpackFormat, unpackFormat, unpackType};
         fua->AddTexUnpack(usage, pi, dui);
 
         fua->AllowUnsizedTexFormat(pi, usage);
     };
 
--- a/dom/canvas/WebGLExtensionEXTColorBufferFloat.cpp
+++ b/dom/canvas/WebGLExtensionEXTColorBufferFloat.cpp
@@ -15,17 +15,17 @@ WebGLExtensionEXTColorBufferFloat::WebGL
     : WebGLExtensionBase(webgl)
 {
     MOZ_ASSERT(IsSupported(webgl), "Don't construct extension if unsupported.");
 
     auto& fua = webgl->mFormatUsage;
 
     auto fnUpdateUsage = [&fua](GLenum sizedFormat, webgl::EffectiveFormat effFormat) {
         auto usage = fua->EditUsage(effFormat);
-        usage->isRenderable = true;
+        usage->SetRenderable();
         fua->AllowRBFormat(sizedFormat, usage);
     };
 
 #define FOO(x) fnUpdateUsage(LOCAL_GL_ ## x, webgl::EffectiveFormat::x)
 
     FOO(R16F);
     FOO(RG16F);
     FOO(RGBA16F);
--- a/dom/canvas/WebGLExtensionSRGB.cpp
+++ b/dom/canvas/WebGLExtensionSRGB.cpp
@@ -44,17 +44,17 @@ WebGLExtensionSRGB::WebGLExtensionSRGB(W
 
         fua->AllowUnsizedTexFormat(pi, usage);
     };
 
     fnAdd(webgl::EffectiveFormat::SRGB8, LOCAL_GL_SRGB, LOCAL_GL_RGB);
     fnAdd(webgl::EffectiveFormat::SRGB8_ALPHA8, LOCAL_GL_SRGB_ALPHA, LOCAL_GL_RGBA);
 
     auto usage = fua->EditUsage(webgl::EffectiveFormat::SRGB8_ALPHA8);
-    usage->isRenderable = true;
+    usage->SetRenderable();
     fua->AllowRBFormat(LOCAL_GL_SRGB8_ALPHA8, usage);
 }
 
 WebGLExtensionSRGB::~WebGLExtensionSRGB()
 {
 }
 
 bool
--- a/dom/canvas/WebGLFramebuffer.cpp
+++ b/dom/canvas/WebGLFramebuffer.cpp
@@ -273,17 +273,17 @@ WebGLFBAttachPoint::IsComplete(WebGLCont
     Size(&width, &height);
     if (!width || !height) {
         AttachmentName(out_info);
         out_info->AppendLiteral(" has no width or height");
         return false;
     }
 
     const auto formatUsage = Format();
-    if (!formatUsage->isRenderable) {
+    if (!formatUsage->IsRenderable()) {
         nsAutoCString attachName;
         AttachmentName(&attachName);
 
         *out_info = nsPrintfCString("%s has an effective format of %s, which is not"
                                     " renderable",
                                     attachName.BeginReading(), formatUsage->format->name);
         return false;
     }
--- a/dom/canvas/WebGLTexture.cpp
+++ b/dom/canvas/WebGLTexture.cpp
@@ -743,17 +743,17 @@ WebGLTexture::GenerateMipmap(TexTarget t
     }
 
     // OpenGL ES 3.0.4 p160:
     // If the level base array was not specified with an unsized internal format from
     // table 3.3 or a sized internal format that is both color-renderable and
     // texture-filterable according to table 3.13, an INVALID_OPERATION error
     // is generated.
     const auto usage = baseImageInfo.mFormat;
-    bool canGenerateMipmap = (usage->isRenderable && usage->isFilterable);
+    bool canGenerateMipmap = (usage->IsRenderable() && usage->isFilterable);
     switch (usage->format->effectiveFormat) {
     case webgl::EffectiveFormat::Luminance8:
     case webgl::EffectiveFormat::Alpha8:
     case webgl::EffectiveFormat::Luminance8Alpha8:
         // Non-color-renderable formats from Table 3.3.
         canGenerateMipmap = true;
         break;
     default: