Bug 1075305 - WebGL2 - remove WebGL prefix from WebGLTexture::ImageInfo.; r=bjacob

This commit is contained in:
Dan Glastonbury
2014-09-30 13:50:00 +10:00
parent 4faa9cd653
commit 841f96bceb
6 changed files with 40 additions and 40 deletions

View File

@@ -80,7 +80,7 @@ WebGLFramebuffer::Attachment::HasAlpha() const
MOZ_ASSERT(HasImage());
if (Texture() && Texture()->HasImageInfoAt(mTexImageTarget, mTexImageLevel))
return FormatHasAlpha(Texture()->ImageInfoAt(mTexImageTarget, mTexImageLevel).WebGLInternalFormat());
return FormatHasAlpha(Texture()->ImageInfoAt(mTexImageTarget, mTexImageLevel).InternalFormat());
else if (Renderbuffer())
return FormatHasAlpha(Renderbuffer()->InternalFormat());
else return false;
@@ -97,7 +97,7 @@ WebGLFramebuffer::GetFormatForAttachment(const WebGLFramebuffer::Attachment& att
MOZ_ASSERT(tex.HasImageInfoAt(attachment.ImageTarget(), 0));
const WebGLTexture::ImageInfo& imgInfo = tex.ImageInfoAt(attachment.ImageTarget(), 0);
return imgInfo.WebGLInternalFormat().get();
return imgInfo.InternalFormat().get();
}
if (attachment.Renderbuffer())
@@ -111,7 +111,7 @@ WebGLFramebuffer::Attachment::IsReadableFloat() const
{
const WebGLTexture* tex = Texture();
if (tex && tex->HasImageInfoAt(mTexImageTarget, mTexImageLevel)) {
GLenum type = tex->ImageInfoAt(mTexImageTarget, mTexImageLevel).WebGLType().get();
GLenum type = tex->ImageInfoAt(mTexImageTarget, mTexImageLevel).Type().get();
switch (type) {
case LOCAL_GL_FLOAT:
case LOCAL_GL_HALF_FLOAT_OES:
@@ -331,23 +331,23 @@ WebGLFramebuffer::Attachment::IsComplete() const
MOZ_ASSERT(Texture()->HasImageInfoAt(mTexImageTarget, mTexImageLevel));
const WebGLTexture::ImageInfo& imageInfo =
Texture()->ImageInfoAt(mTexImageTarget, mTexImageLevel);
GLenum webGLFormat = imageInfo.WebGLInternalFormat().get();
GLenum internalformat = imageInfo.InternalFormat().get();
if (mAttachmentPoint == LOCAL_GL_DEPTH_ATTACHMENT)
return IsValidFBOTextureDepthFormat(webGLFormat);
return IsValidFBOTextureDepthFormat(internalformat);
if (mAttachmentPoint == LOCAL_GL_STENCIL_ATTACHMENT)
return false; // Textures can't have the correct format for stencil buffers
if (mAttachmentPoint == LOCAL_GL_DEPTH_STENCIL_ATTACHMENT) {
return IsValidFBOTextureDepthStencilFormat(webGLFormat);
return IsValidFBOTextureDepthStencilFormat(internalformat);
}
if (mAttachmentPoint >= LOCAL_GL_COLOR_ATTACHMENT0 &&
mAttachmentPoint <= FBAttachment(LOCAL_GL_COLOR_ATTACHMENT0 - 1 +
WebGLContext::kMaxColorAttachments))
{
return IsValidFBOTextureColorFormat(webGLFormat);
return IsValidFBOTextureColorFormat(internalformat);
}
MOZ_ASSERT(false, "Invalid WebGL attachment point?");
return false;