Bug 1265676 - Fix other callsites. - r=ethlin
MozReview-Commit-ID: EgLMZajmRnD
--- 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: